def unpatch_ipdb():
  """Unpatches the IPython debugger so that it uses its original displayhook."""
  global old_displayhook
  assert old_displayhook is not None
  assert IPython.core.debugger.Pdb.displayhook is displayhook_with_ipython
  IPython.core.debugger.Pdb.displayhook = old_displayhook
  old_displayhook = None
Unpatches the IPython debugger so that it uses its original displayhook.
penzai/toolshed/patch_ipdb.py