code: def import_submodules(module: ModuleType):
      """Import all submodules of a module, recursively."""
      for loader, module_name, is_pkg in pkgutil.walk_packages(
          module.__path__, module.__name__ + "."
      ):
          blacklisted = any(
              [f".{bl}." in module_name for bl in BLACKLIST]
          )
          if blacklisted:
              continue
          mod = importlib.import_module(module_name)
          if mod.__name__.endswith(".api"):
              api_modules.append(mod)
  
imports: import importlib
  import pkgutil
  from types import ModuleType
  import statsmodels
label_desc: Use image node_id 1 for calling a global function with example usage: import_submodules(module) without return types