code: def _translate_ch_to_exc(ch):
      if ch == "\x03":
          raise KeyboardInterrupt()
      if ch == "\x04" and not WIN:  # Unix-like, Ctrl+D
          raise EOFError()
      if ch == "\x1a" and WIN:  # Windows, Ctrl+Z
          raise EOFError()
  
imports: import contextlib
  import math
  import os
  import sys
  import time
  from ._compat import _default_text_stdout
  from ._compat import CYGWIN
  from ._compat import get_best_encoding
  from ._compat import int_types
  from ._compat import isatty
  from ._compat import open_stream
  from ._compat import range_type
  from ._compat import strip_ansi
  from ._compat import term_len
  from ._compat import WIN
  from .exceptions import ClickException
  from .utils import echo
label_desc: Use image node_id 7 for calling a global function with example usage: _translate_ch_to_exc(ch) without return types