def import_module_and_get_function(whole_function):
        """
        Given a modular path to a function, import that module
        and return the function.
        """
        module, function = whole_function.rsplit('.', 1)
        app_module = importlib.import_module(module)
        app_function = getattr(app_module, function)
        return app_function
def import_module_and_get_function ( whole_function ) : module , function = whole_function . rsplit ( '.' , 1 ) app_module = importlib . import_module ( module ) app_function = getattr ( app_module , function ) return app_function
Given a modular path to a function, import that module
        and return the function.