class_docstr: ANSI formatted text.
  Take something ANSI escaped text, for use as a formatted string. E.g.
  
  ::
  
      ANSI('\x1b[31mhello \x1b[32mworld')
  
  Characters between ``\001`` and ``\002`` are supposed to have a zero width
  when printed, but these are literally sent to the terminal output. This can
  be used for instance, for inserting Final Term prompt commands.  They will
  be translated into a prompt_toolkit '[ZeroWidthEscape]' fragment.
class_docstr_tok: ["ANSI","formatted","text",".","Take","something","ANSI","escaped","text",",","for","use","as","a","formatted","string",".","E.g",".",":",":","ANSI","(","'\\x1b","[","31mhello","\\x1b","[","32mworld","'",")","Characters","between","``","\\001","``","and","``","\\002","``","are","supposed","to","have","a","zero","width","when","printed",",","but","these","are","literally","sent","to","the","terminal","output",".","This","can","be","used","for","instance",",","for","inserting","Final","Term","prompt","commands",".","They","will","be","translated","into","a","prompt_toolkit","'","[","ZeroWidthEscape","]","'","fragment","."]
docstr: ANSI('<b>%s</b>') % value
docstr_tok: ["ANSI","(","'","<","b",">","%","s","<","\/b",">","'",")","%","value"]
code: def __mod__(self, value: object) -> ANSI:
      """
      ANSI('<b>%s</b>') % value
      """
      if not isinstance(value, tuple):
          value = (value,)
  
      value = tuple(ansi_escape(i) for i in value)
      return ANSI(self.value % value)
  
file_path: catboost/contrib/python/prompt-toolkit/py3/prompt_toolkit/formatted_text/ansi.py
imports: from __future__ import annotations
  from string import Formatter
  from typing import Generator
  from prompt_toolkit.output.vt100 import BG_ANSI_COLORS, FG_ANSI_COLORS
  from prompt_toolkit.output.vt100 import _256_colors
  from .base import StyleAndTextTuples
label_desc: Use image node_id 8 for calling the ANSI obj's underlying member method code with example usage: obj.__mod__(value) and returns: ANSI