def METHOD_NAME(template_id, *, handle_error=None, ignore_not_found=False):
    from bpy_restrict_state import RestrictBlend
    if handle_error is None:
        def handle_error(_ex):
            import traceback
            traceback.print_exc()
    # Split registering up into 2 steps so we can undo
    # if it fails par way through.
    # disable the context, using the context at all is
    # really bad while loading an template, don't do it!
    with RestrictBlend():
        # 1) try import
        try:
            mod = import_from_id(template_id, ignore_not_found=ignore_not_found)
        except BaseException as ex:
            handle_error(ex)
            return None
        _modules[template_id] = mod
        if mod is None:
            return None
        mod.__template_enabled__ = False
        # 2) try run the modules register function
        try:
            mod.register()
        except BaseException as ex:
            print("Exception in module register(): %r" %
                  getattr(mod, "__file__", template_id))
            handle_error(ex)
            del _modules[template_id]
            return None
    # * OK loaded successfully! *
    mod.__template_enabled__ = True
    if _bpy.app.debug_python:
        print("\tapp_template_utils.enable", mod.__name__)
    return mod