class_docstr: Cach which maps (r, g, b) tuples to 256 colors.
code: def __missing__(self, value):
      r, g, b = value
  
      # Find closest color.
      # (Thanks to Pygments for this!)
      distance = (
          257 * 257 * 3
      )  # "infinity" (>distance from #000000 to #ffffff)
      match = 0
  
      for i, (r2, g2, b2) in enumerate(self.colors):
          d = (r - r2) ** 2 + (g - g2) ** 2 + (b - b2) ** 2
  
          if d < distance:
              match = i
              distance = d
  
      # Turn color name into code.
      self[value] = match
      return match
  
imports: from __future__ import unicode_literals
  from prompt_toolkit.filters import to_simple_filter, Condition
  from prompt_toolkit.layout.screen import Size
  from prompt_toolkit.renderer import Output
  from prompt_toolkit.styles import ANSI_COLOR_NAMES
  from six.moves import range
  import array
  import errno
  import os
  import six
label_desc: Use image node_id 2 for calling the _256ColorCache obj's underlying member method code with example usage: obj.__missing__(value) and returns: match