def _load_function(source):
    module_string, function_string = source.rsplit('.', 1)
    modules = [i for i in sys.modules.keys() if 'calliope' in i]
    # Check if module already loaded, if so, don't re-import it
    if (module_string in modules):
        module = sys.modules[module_string]
    elif ('calliope.' + module_string) in modules:
        module = sys.modules['calliope.' + module_string]
    # Else load the module
    else:
        try:
            module = importlib.import_module(module_string)
        except ImportError:
            module = importlib.import_module('calliope.' + module_string)
    return getattr(module, function_string)
Increases the indentation level.
dataset/ETHPy150Open calliope-project/calliope/calliope/core.py/_load_function--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/syslog_ng.py/_increase_indent