

def _module_from_ast(self, name, path):
    tree = self._parse_and_transform_ast(path)
    package = '.'.join(name.split('/')[:(- 1)])
    module = imp.new_module(name)
    module.__file__ = package
    try:
        __import__(package)
        module.__package__ = package
    except (ImportError, ValueError):
        pass
    self._prepare_path_for_local_packages()
    code = compile(tree, path, 'exec')
    exec(code, module.__dict__)
    self._restore_path()
    return module

dataset/ETHPy150Open nestorsalceda/mamba/mamba/example_collector.py ExampleCollector._module_from_ast/VarMisuse@57/67 `path`->`package`