code: def launch_ipdb_on_exception():
      try:
          yield
      except Exception:
          e, m, tb = sys.exc_info()
          print(m.__repr__(), file=sys.stderr)
          post_mortem(tb)
      finally:
          pass
  
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 12 for calling a global function with example usage: launch_ipdb_on_exception() without return types