def get_provider(moduleOrReq):
    if isinstance(moduleOrReq, Requirement):
        return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
    try:
        module = sys.modules[moduleOrReq]
    except KeyError:
        __import__(moduleOrReq)
        module = sys.modules[moduleOrReq]
    loader = getattr(module, '__loader__', None)
    return _find_adapter(_provider_factories, loader)(module)
Return an IResourceProvider for the named module or requirement
dataset/ETHPy150Open anzev/hedwig/build/pip/pip/_vendor/pkg_resources/__init__.py/get_provider