code: def _at_exit(self):
          
  
          if self.process_exit:
  
              try:
  
                  term = self.term
  
                  if self.set_scroll:
                      term.reset()
                  else:
                      term.move_to(0, term.height)
  
                  self.term.feed()
  
              except ValueError:  # Possibly closed file handles
                  pass
docs: Resets terminal to normal configuration