code: def wrap_sys_excepthook():
      # make sure we wrap it only once or we would end up with a cycle
      #  BdbQuit_excepthook.excepthook_ori == BdbQuit_excepthook
      if sys.excepthook != BdbQuit_excepthook:
          BdbQuit_excepthook.excepthook_ori = sys.excepthook
          sys.excepthook = BdbQuit_excepthook
  
imports: from __future__ import print_function
  import os
  import sys
  from decorator import contextmanager
  from IPython import get_ipython
  from IPython.core.debugger import BdbQuit_excepthook
  from IPython.terminal.ipapp import TerminalIPythonApp
  from IPython.terminal.embed import InteractiveShellEmbed
label_desc: Use image node_id 3 for calling a global function with example usage: wrap_sys_excepthook() without return types