code: def replace_import_hook(new_import):
      saved_import = builtin_mod.__import__
      builtin_mod.__import__ = new_import
      try:
          yield
      finally:
          builtin_mod.__import__ = saved_import
  
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 1 for calling a global function with example usage: replace_import_hook(new_import) without return types