(package)
return resolved
Take a package name or module object and return the module.

    Raise an exception if the resolved module is not a package.
Take a package name or module object and return the module.
Take a package name or module object and return the module .
def get_package(package):
    # type: (Package) -> types.ModuleType
    """Take a package name or module object and return the module.

    Raise an exception if the resolved module is not a package.
    """
    resolved = resolve(package)
    if wrap_spec(resolved).submodule_search_locations is None:
        raise TypeError(f'{package!r} is not a package')
    return resolved
def get_package ( package ) : # type: (Package) -> types.ModuleType resolved = resolve ( package ) if wrap_spec ( resolved ) . submodule_search_locations is None : raise TypeError ( f'{package!r} is not a package' ) return resolved