code: def erase(self, leave_alternate_screen=True, erase_title=True):
          
          output = self.output
  
          output.cursor_backward(self._cursor_pos.x)
          output.cursor_up(self._cursor_pos.y)
          output.erase_down()
          output.reset_attributes()
          output.enable_autowrap()
          output.flush()
  
          # Erase title.
          if self._last_title and erase_title:
              output.clear_title()
  
          self.reset(leave_alternate_screen=leave_alternate_screen)
docs: Hide all output and put the cursor back at the first line. This is for
          instance used for running a system command (while hiding the CLI) and
          later resuming the same CLI.)
  
          :param leave_alternate_screen: When True, and when inside an alternate
              screen buffer, quit the alternate screen.
          :param erase_title: When True, clear the title from the title bar.