code: def restore_python(self):
          
          orig = self.orig_settings
          sys.setrecursionlimit(orig["sys.recursionlimit"])
  
          if "sys.tracebacklimit" in orig:
              sys.tracebacklimit = orig["sys.tracebacklimit"]
          else:
              if hasattr(sys, "tracebacklimit"):
                  del sys.tracebacklimit
  
          if "showwarning" in orig:
              warnings.showwarning = orig["showwarning"]
  
          orig.clear()
          threading.stack_size()
docs: Restore Python settings to the original states