from importlib import import_module


def get_code(path):
    """
    Given "core.utils:get_code", imports the module "core.utils" and returns
    "get_code" from it.
    """
    module_name, member_name = path.split(':')
    module = import_module(module_name)
    return getattr(module, member_name)