code: def import_submodule(mod, subname, fullname):
      """m = import_submodule(mod, subname, fullname)"""
      # Require:
      # if mod == None: subname == fullname
      # else: mod.__name__ + "." + subname == fullname
  
      global found_now
      if fullname in found_now and fullname in sys.modules:
          m = sys.modules[fullname]
      else:
          print("Reloading", fullname)
          found_now[fullname] = 1
          oldm = sys.modules.get(fullname, None)
          try:
              if oldm is not None:
                  m = importlib.reload(oldm)
              else:
                  m = importlib.import_module(subname, mod)
          except:
              # load_module probably removed name from modules because of
              # the error.  Put back the original module object.
              if oldm:
                  sys.modules[fullname] = oldm
              raise
  
          add_submodule(mod, m, fullname, subname)
  
      return m
  
file_path: catboost/contrib/python/ipython/py3/IPython/lib/deepreload.py
imports: import builtins
  from contextlib import contextmanager
  import importlib
  import sys
  from types import ModuleType
  from warnings import warn
  import types
label_desc: Use image node_id 4 for calling a global function with example usage: import_submodule(mod, subname, fullname) and returns: m