MAINT: move another function from the testing and application modules to a core module