class_docstr: Template for string interpolation with formatted text.
  
  Example::
  
      Template(' ... {} ... ').format(HTML(...))
  
  :param text: Plain text.
class_docstr_tok: ["Template","for","string","interpolation","with","formatted","text",".","Example",":",":","Template","(","'","...","{","}","...","'",")",".format","(","HTML","(","...",")",")",":","param","text",":","Plain","text","."]
code: def format(self, *values: AnyFormattedText) -> AnyFormattedText:
      def get_result() -> AnyFormattedText:
          # Split the template in parts.
          parts = self.text.split("{}")
          assert len(parts) - 1 == len(values)
  
          result = FormattedText()
          for part, val in zip(parts, values):
              result.append(("", part))
              result.extend(to_formatted_text(val))
          result.append(("", parts[-1]))
          return result
  
      return get_result
  
file_path: catboost/contrib/python/prompt-toolkit/py3/prompt_toolkit/formatted_text/base.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Any, Callable, Iterable, List, Tuple, Union, cast
  from prompt_toolkit.mouse_events import MouseEvent
label_desc: Use image node_id 2 for calling the Template obj's underlying member method code with example usage: obj.format() and returns: get_result, result