code: def pause(info: t.Optional[str] = None, err: bool = False) -> None:
      """This command stops execution and waits for the user to press any
      key to continue.  This is similar to the Windows batch "pause"
      command.  If the program is not run through a terminal, this command
      will instead do nothing.
  
      .. versionadded:: 2.0
  
      .. versionadded:: 4.0
         Added the `err` parameter.
  
      :param info: The message to print before pausing. Defaults to
          ``"Press any key to continue..."``.
      :param err: if set to message goes to ``stderr`` instead of
                  ``stdout``, the same as with echo.
      """
      if not isatty(sys.stdin) or not isatty(sys.stdout):
          return
  
      if info is None:
          info = _("Press any key to continue...")
  
      try:
          if info:
              echo(info, nl=False, err=err)
          try:
              getchar()
          except (KeyboardInterrupt, EOFError):
              pass
      finally:
          if info:
              echo(err=err)
  
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 17 for calling a global function with example usage: pause(info, err) without return types