code: def deep_import_hook(
      name, globals=None, locals=None, fromlist=None, level=-1
  ):
      """Replacement for __import__()"""
      parent, buf = get_parent(globals, level)
  
      head, name, buf = load_next(
          parent, None if level < 0 else parent, name, buf
      )
  
      tail = head
      while name:
          tail, name, buf = load_next(tail, tail, name, buf)
  
      # If tail is None, both get_parent and load_next found
      # an empty module name: someone called __import__("") or
      # doctored faulty bytecode
      if tail is None:
          raise ValueError("Empty module name")
  
      if not fromlist:
          return head
  
      ensure_fromlist(tail, fromlist, buf, 0)
      return tail
  
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 7 for calling a global function with example usage: deep_import_hook(name, globals, locals, fromlist, level) and returns: tail, head