def _load_obj(obj_name):
    for maxsplit in range(1, (obj_name.count('.') + 1)):
        func_name_split = obj_name.rsplit('.', maxsplit)
        module = func_name_split[0]
        func_parts = func_name_split[1:]
        try:
            obj = importlib.import_module(module)
        except ImportError:
            pass
        else:
            continue
    if ('module' not in locals()):
        raise ImportError('No module can be imported from "{}"'.format(obj_name))
    for part in func_parts:
        obj = getattr(obj, part)
    return obj
def _load_obj(obj_name):
    for maxsplit in range(1, (obj_name.count('.') + 1)):
        func_name_split = obj_name.rsplit('.', maxsplit)
        module = func_name_split[0]
        func_parts = func_name_split[1:]
        try:
            obj = importlib.import_module(module)
        except ImportError:
            pass
        else:
            continue
    if ('module' not in locals()):
        raise ImportError('No module can be imported from "{}"'.format(obj_name))
    for part in func_parts:
        obj = getattr(obj, part)
    return obj