code: def _get_getch_impl_win() -> Optional[Callable[[], str]]:
      try:
          # try Windows API
          import msvcrt  # type: ignore
      except ImportError:
          return None
  
      def _getch():
          ch = msvcrt.getch
          if ord(ch) == 3:
              raise KeyboardInterrupt
          return ch
  
      return _getch
  
file_path: vowpal_wabbit/utl/active_interactor.py
imports: import socket
  import argparse
  from typing import Callable, ContextManager, Optional, TextIO
  import contextlib
label_desc: Use image node_id 3 for calling a global function with example usage: _get_getch_impl_win() and returns: _getch, ch, None