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)
  
          if mod is None:
              path = None
          elif hasattr(mod, "__path__"):
              path = mod.__path__
          else:
              return None
  
          try:
              # This appears to be necessary on Python 3, because imp.find_module()
              # tries to import standard libraries (like io) itself, and we don't
              # want them to be processed by our deep_import_hook.
              with replace_import_hook(original_import):
                  fp, filename, stuff = imp.find_module(subname, path)
          except ImportError:
              return None
  
          try:
              m = imp.load_module(fullname, fp, filename, stuff)
          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
          finally:
              if fp:
                  fp.close()
  
          add_submodule(mod, m, fullname, subname)
  
      return m
  
file_path: catboost/contrib/python/ipython/py2/IPython/lib/deepreload.py
imports: from __future__ import print_function
  from contextlib import contextmanager
  import imp
  import sys
  from types import ModuleType
  from warnings import warn
  from IPython.utils.py3compat import builtin_mod, builtin_mod_name
label_desc: Use image node_id 4 for calling a global function with example usage: import_submodule(mod, subname, fullname) and returns: m, None, None