code: def restore_ipython(self):
          
          if not self.is_ipysetup:
              return
  
          shell_class = type(self.shell)
          shell_class.showtraceback = shell_class.default_showtraceback
          del shell_class.default_showtraceback
  
          self.is_ipysetup = False
docs: Restore default IPython showtraceback