code: def style_for_token(cls, token):
      t = cls._styles[token]
      ansicolor = bgansicolor = None
      color = t[0]
      if color in _deprecated_ansicolors:
          color = _deprecated_ansicolors[color]
      if color in ansicolors:
          ansicolor = color
          color = _ansimap[color]
      bgcolor = t[4]
      if bgcolor in _deprecated_ansicolors:
          bgcolor = _deprecated_ansicolors[bgcolor]
      if bgcolor in ansicolors:
          bgansicolor = bgcolor
          bgcolor = _ansimap[bgcolor]
  
      return {
          "color": color or None,
          "bold": bool(t[1]),
          "italic": bool(t[2]),
          "underline": bool(t[3]),
          "bgcolor": bgcolor or None,
          "border": t[5] or None,
          "roman": bool(t[6]) or None,
          "sans": bool(t[7]) or None,
          "mono": bool(t[8]) or None,
          "ansicolor": ansicolor,
          "bgansicolor": bgansicolor,
      }
  
file_path: catboost/contrib/python/Pygments/py3/pygments/style.py
imports: from pygments.token import Token, STANDARD_TYPES
label_desc: Use image node_id 2 for calling the StyleMeta obj's underlying member method code with example usage: obj.style_for_token(cls, token) and returns: dict