code: def restore_stds(self):
          
          if not self.debug:
              sys.stdout = self.initial_stdout
              sys.stderr = self.initial_stderr
              sys.stdin = self.initial_stdin
docs: Restore stds