code: def clear() -> None:
      """Clears the terminal screen.  This will have the effect of clearing
      the whole visible space of the terminal and moving the cursor to the
      top left.  This does not do anything if not connected to a terminal.
  
      .. versionadded:: 2.0
      """
      if not isatty(sys.stdout):
          return
  
      # ANSI escape \033[2J clears the screen, \033[1;1H moves the cursor
      echo("\033[2J\033[1;1H", nl=False)
  
imports: import inspect
  import io
  import itertools
  import sys
  import typing
  from gettext import gettext
  from ._compat import isatty
  from ._compat import strip_ansi
  from .exceptions import Abort
  from .exceptions import UsageError
  from .globals import resolve_color_default
  from .types import Choice
  from .types import convert_type
  from .types import ParamType
  from .utils import echo
  from .utils import LazyFile
label_desc: Use image node_id 8 for calling a global function with example usage: clear() without return types