Tools for debugging, from fMRIPrep.
Return True if all in/outs are tty.
Overload default sys.excepthook with our exceptionhook handler.
If interactive, our exceptionhook handler will invoke pdb.post_mortem; if not interactive, then invokes default handler.