class_docstr: Cache for VT100 escape codes. It maps
  (fgcolor, bgcolor, bold, underline, strike, reverse) tuples to VT100
  escape sequences.
  
  :param true_color: When True, use 24bit colors instead of 256 colors.
class_docstr_tok: ["Cache","for","VT100","escape","codes",".","It","maps","(","fgcolor",",","bgcolor",",","bold",",","underline",",","strike",",","reverse",")","tuples","to","VT100","escape","sequences",".",":","param","true_color",":","When","True",",","use","24bit","colors","instead","of","256","colors","."]
code: def __missing__(self, attrs: Attrs) -> str:
      (
          fgcolor,
          bgcolor,
          bold,
          underline,
          strike,
          italic,
          blink,
          reverse,
          hidden,
      ) = attrs
      parts: list[str] = []
  
      parts.extend(self._colors_to_code(fgcolor or "", bgcolor or ""))
  
      if bold:
          parts.append("1")
      if italic:
          parts.append("3")
      if blink:
          parts.append("5")
      if underline:
          parts.append("4")
      if reverse:
          parts.append("7")
      if hidden:
          parts.append("8")
      if strike:
          parts.append("9")
  
      if parts:
          result = "\x1b[0;" + ";".join(parts) + "m"
      else:
          result = "\x1b[0m"
  
      self[attrs] = result
      return result
  
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 the _EscapeCodeCache obj's underlying member method code with example usage: obj.__missing__(attrs) and returns: result