def debugger():
e, m, tb = sys.exc_info()<EOL>if tb is not None:<EOL><INDENT>_debugger.post_mortem(tb)<EOL><DEDENT>else:<EOL><INDENT>_debugger.set_trace()<EOL><DEDENT>
If called in the context of an exception, calls post_mortem; otherwise
    set_trace.
    ``ipdb`` is preferred over ``pdb`` if installed.