code: def _get_size(fileno: int) -> tuple[int, int]:
      """
      Get the size of this pseudo terminal.
  
      :param fileno: stdout.fileno()
      :returns: A (rows, cols) tuple.
      """
      size = os.get_terminal_size(fileno)
      return size.lines, size.columns
  
imports: from __future__ import annotations
  import io
  import os
  import sys
  from typing import Callable, Dict, Hashable, Iterable, Sequence, TextIO, Tuple
  from prompt_toolkit.cursor_shapes import CursorShape
  from prompt_toolkit.data_structures import Size
  from prompt_toolkit.output import Output
  from prompt_toolkit.styles import ANSI_COLOR_NAMES, Attrs
  from prompt_toolkit.utils import is_dumb_terminal
  from .color_depth import ColorDepth
  from .flush_stdout import flush_stdout
label_desc: Use image node_id 2 for calling a global function with example usage: _get_size(fileno) and returns: size,  size