code: def clear():
      """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
      # If we're on Windows and we don't have colorama available, then we
      # clear the screen by shelling out.  Otherwise we can use an escape
      # sequence.
      if WIN:
          os.system("cls")
      else:
          sys.stdout.write("\033[2J\033[1;1H")
  
imports: import inspect
  import io
  import itertools
  import os
  import struct
  import sys
  from ._compat import DEFAULT_COLUMNS
  from ._compat import get_winterm_size
  from ._compat import isatty
  from ._compat import raw_input
  from ._compat import string_types
  from ._compat import strip_ansi
  from ._compat import text_type
  from ._compat import WIN
  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 Path
  from .utils import echo
  from .utils import LazyFile
label_desc: Use image node_id 9 for calling a global function with example usage: clear() without return types