def import_system_file(mod, safe=True):
    if os.path.isfile(mod):
        return _import_system_file(mod)
    else:
        try:
            return import_module(mod)
        except __HOLE__:
            mod2 = os.path.join(mod, '__init__.py')
            if os.path.isfile(mod2):
                return _import_system_file(mod2)
            elif not safe:
                raise
            pass
dataset/ETHPy150Open quantmind/pulsar/pulsar/utils/importer.py/import_system_file