def import_submodules(package_name):
    """ Import all submodules of a module, recursively
    :param package_name: Package name
    :type package_name: str
    :rtype: dict[types.ModuleType]
    """
package = sys.modules[package_name]
return {name: importlib.import_module(package_name + '.' + name) for loader,
    name, is_pkg in pkgutil.walk_packages(package.__path__)}
How to import all submodules?