code: def __init__(self, shell=None):
      super(BuiltinTrap, self).__init__(shell=shell, config=None)
      self._orig_builtins = {}
      # We define this to track if a single BuiltinTrap is nested.
      # Only turn off the trap when the outermost call to __exit__ is made.
      self._nested_level = 0
      self.shell = shell
      # builtins we always add - if set to HideBuiltin, they will just
      # be removed instead of being replaced by something else
      self.auto_builtins = {
          "exit": HideBuiltin,
          "quit": HideBuiltin,
          "get_ipython": self.shell.get_ipython,
      }
      # Recursive reload function
      try:
          from IPython.lib import deepreload
  
          if self.shell.deep_reload:
              from warnings import warn
  
              warn(
                  "Automatically replacing builtin `reload` by `deepreload.reload` is deprecated since IPython 4.0, please import `reload` explicitly from `IPython.lib.deepreload",
                  DeprecationWarning,
              )
              self.auto_builtins["reload"] = deepreload._dreload
          else:
              self.auto_builtins["dreload"] = deepreload._dreload
      except ImportError:
          pass
  
file_path: catboost/contrib/python/ipython/py2/IPython/core/builtin_trap.py
imports: from traitlets.config.configurable import Configurable
  from IPython.utils.py3compat import builtin_mod, iteritems
  from traitlets import Instance
label_desc: Use image node_id 1 to create a new BuiltinTrap object from inherited base classes: Configurable with example: obj = BuiltinTrap(shell)