code: def _get_text_stderr(buffer_stream: t.BinaryIO) -> t.TextIO:
      text_stream = _NonClosingTextIOWrapper(
          io.BufferedWriter(_WindowsConsoleWriter(STDERR_HANDLE)),
          "utf-16-le",
          "strict",
          line_buffering=True,
      )
      return t.cast(t.TextIO, ConsoleStream(text_stream, buffer_stream))
  
imports: import io
  import sys
  import time
  import typing
  from ctypes import byref
  from ctypes import c_char
  from ctypes import c_char_p
  from ctypes import c_int
  from ctypes import c_ssize_t
  from ctypes import c_ulong
  from ctypes import c_void_p
  from ctypes import POINTER
  from ctypes import py_object
  from ctypes import Structure
  from ctypes.wintypes import DWORD
  from ctypes.wintypes import HANDLE
  from ctypes.wintypes import LPCWSTR
  from ctypes.wintypes import LPWSTR
  from ._compat import _NonClosingTextIOWrapper
  import msvcrt
  from ctypes import windll
  from ctypes import WINFUNCTYPE
label_desc: Use image node_id 3 for calling a global function with example usage: _get_text_stderr(buffer_stream) and returns: t