code: def finalize(self, result):
          
          sys.stderr = self._stderr.pop()
          sys.stdout = self._stdout.pop()
          pdb.set_trace = self._set_trace.pop()
          pdb.Pdb.cmdloop = self._cmdloop.pop()
docs: Put monkeypatches back as we found them.