def _run_hook_module(hook_type, hook_module, obj, key=""):
    """
    Run a hook function from hook_module.

    Given a @hook_type, a @hook_module and a settings @obj, load the function
    and execute it if found.
    """

    # check errors
    if hook_module and getattr(hook_module, "_error", False):
        if not isinstance(hook_module._error, FileNotFoundError):
            raise hook_module._error

    # execute hook
    hook_source = hook_module.__file__
    hook_func = getattr(hook_module, hook_type, None)
    if hook_func:
        identifier = _get_unique_hook_id(hook_func, hook_source)
        if hook_type not in obj._loaded_hooks.get(identifier, {}):
            _run_hook_function(obj, hook_type, hook_func, hook_source, key)

    Run a hook function from hook_module.

    Given a @hook_type, a @hook_module and a settings @obj, load the function
    and execute it if found.
    
dynaconf/loaders/__init__.py