class_docstr: Typical usage:
  
  ::
  
      output = Vt100_Output.from_pty(sys.stdout)
      r = Renderer(style, output)
      r.render(app, layout=...)
class_docstr_tok: ["Typical","usage",":",":",":","output","=","Vt100_Output.from_pty","(","sys.stdout",")","r","=","Renderer","(","style",",","output",")","r.render","(","app",",","layout=","...",")"]
docstr: 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.
docstr_tok: ["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","."]
code: def erase(self, leave_alternate_screen: bool = True) -> None:
      """
      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.
      """
      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()
  
      self.reset(leave_alternate_screen=leave_alternate_screen)
  
imports: from __future__ import annotations
  from asyncio import FIRST_COMPLETED, Future, ensure_future, sleep, wait
  from collections import deque
  from enum import Enum
  from typing import TYPE_CHECKING, Any, Callable, Dict, Hashable
  from prompt_toolkit.application.current import get_app
  from prompt_toolkit.cursor_shapes import CursorShape
  from prompt_toolkit.data_structures import Point, Size
  from prompt_toolkit.filters import FilterOrBool, to_filter
  from prompt_toolkit.formatted_text import AnyFormattedText, to_formatted_text
  from prompt_toolkit.layout.mouse_handlers import MouseHandlers
  from prompt_toolkit.layout.screen import Char, Screen, WritePosition
  from prompt_toolkit.output import ColorDepth, Output
  from prompt_toolkit.styles import Attrs, BaseStyle, DummyStyleTransformation, StyleTransformation
label_desc: Use image node_id 10 for calling the Renderer obj's underlying member method code with example usage: obj.erase(leave_alternate_screen) without return types