code: def _detached_input(input: Vt100Input) -> Generator[None, None, None]:
      loop = get_running_loop()
      fd = input.fileno()
      previous = _current_callbacks.get((loop, fd))
  
      if previous:
          loop.remove_reader(fd)
          _current_callbacks[loop, fd] = None
  
      try:
          yield
      finally:
          if previous:
              loop.add_reader(fd, previous)
              _current_callbacks[loop, fd] = previous
  
imports: from __future__ import annotations
  import sys
  import contextlib
  import io
  import termios
  import tty
  from asyncio import AbstractEventLoop, get_running_loop
  from typing import Callable, ContextManager, Generator, TextIO
  from ..key_binding import KeyPress
  from .base import Input
  from .posix_utils import PosixStdinReader
  from .vt100_parser import Vt100Parser
label_desc: Use image node_id 2 for calling a global function with example usage: _detached_input(input) without return types