__all__ = ["load"]


import imp
import importlib


def load(name, path):
    """Load and initialize a module implemented as a Python source file and return its module object"""
    if hasattr(importlib, "machinery"):
        loader = importlib.machinery.SourceFileLoader(name, path)
        return loader.load_module()
    return imp.load_source(name, path)

[((13, 11, 13, 38), 'imp.load_source', 'imp.load_source', ({(13, 27, 13, 31): 'name', (13, 33, 13, 37): 'path'}, {}), '(name, path)', False, 'import imp\n'), ((11, 17, 11, 65), 'importlib.machinery.SourceFileLoader', 'importlib.machinery.SourceFileLoader', ({(11, 54, 11, 58): 'name', (11, 60, 11, 64): 'path'}, {}), '(name, path)', False, 'import importlib\n')]