def METHOD_NAME(p: pathlib.Path) -> types.ModuleType:
    """
    Load a python module from a path.
    :param pathlib.Path p: Path to ``<module>.py``
    :rtype: Module
    """
    import importlib.util
    import importlib.abc
    if not p.is_file():
        raise FileNotFoundError(f"The module {str(p)!r} does not exist")
    default_sys_path = sys.path
    try:
        module_spec = importlib.util.spec_from_file_location(
            name=p.stem, location=str(p)
        )
        module = importlib.util.module_from_spec(module_spec)
        if not isinstance(module_spec.loader, importlib.abc.Loader):
            raise TypeError(f"Invalid module spec {module_spec!r}")
        sys.path = default_sys_path + [str(p.parent)]
        module_spec.loader.exec_module(module)
    finally:
        sys.path = default_sys_path
    return module