code: def test_html_interpolation():
      # %-style interpolation.
      value = HTML("<b>%s</b>") % "&hello"
      assert to_formatted_text(value) == [("class:b", "&hello")]
  
      value = HTML("<b>%s</b>") % ("<hello>",)
      assert to_formatted_text(value) == [("class:b", "<hello>")]
  
      value = HTML("<b>%s</b><u>%s</u>") % ("<hello>", "</world>")
      assert to_formatted_text(value) == [
          ("class:b", "<hello>"),
          ("class:u", "</world>"),
      ]
  
      # Format function.
      value = HTML("<b>{0}</b><u>{1}</u>").format("'hello'", '"world"')
      assert to_formatted_text(value) == [
          ("class:b", "'hello'"),
          ("class:u", '"world"'),
      ]
  
      value = HTML("<b>{a}</b><u>{b}</u>").format(a="hello", b="world")
      assert to_formatted_text(value) == [
          ("class:b", "hello"),
          ("class:u", "world"),
      ]
  
      value = HTML("<b>{:02d}</b><u>{:.3f}</u>").format(3, 3.14159)
      assert to_formatted_text(value) == [
          ("class:b", "03"),
          ("class:u", "3.142"),
      ]
  
file_path: catboost/contrib/python/prompt-toolkit/py3/tests/test_formatted_text.py
imports: from __future__ import annotations
  from prompt_toolkit.formatted_text import ANSI, HTML, FormattedText, PygmentsTokens, Template, merge_formatted_text, to_formatted_text
  from prompt_toolkit.formatted_text.utils import split_lines
label_desc: Use image node_id 8 for calling a global function with example usage: test_html_interpolation() without return types