import pkgutil
import importlib


def submodules(package):
    """Find all sub-modules of a package."""
    rst = {}

    for _, name, _ in pkgutil.iter_modules(package.__path__):
        fullModuleName = f"{package.__name__}.{name}"
        mod = importlib.import_module(fullModuleName, package=package.__path__)
        rst[name] = mod

    return rst