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: Turn current style flags into a string for usage in a formatted text.
docstr_tok: ["Turn","current","style","flags","into","a","string","for","usage","in","a","formatted","text","."]
code: def _create_style_string(self) -> str:
      """
      Turn current style flags into a string for usage in a formatted text.
      """
      result = []
      if self._color:
          result.append(self._color)
      if self._bgcolor:
          result.append("bg:" + self._bgcolor)
      if self._bold:
          result.append("bold")
      if self._underline:
          result.append("underline")
      if self._strike:
          result.append("strike")
      if self._italic:
          result.append("italic")
      if self._blink:
          result.append("blink")
      if self._reverse:
          result.append("reverse")
      if self._hidden:
          result.append("hidden")
  
      return " ".join(result)
  
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 4 for calling the ANSI obj's underlying member method code with example usage: obj._create_style_string() and returns: str