code: def set_trace(frame=None, context=None, cond=True):
      if not cond:
          return
      wrap_sys_excepthook()
      if frame is None:
          frame = sys._getframe().f_back
      p = _init_pdb(context).set_trace(frame)
      if p and hasattr(p, "shell"):
          p.shell.restore_sys_module_state()
  
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 4 for calling a global function with example usage: set_trace(frame, context, cond) without return types