code: def test_with_style():
      f = _Capture()
      style = style_from_dict(
          {
              Token.Hello: "#ff0066",
              Token.World: "#44ff44 italic",
          }
      )
      tokens = [
          (Token.Hello, "Hello "),
          (Token.World, "world"),
      ]
      print_tokens(tokens, style=style, file=f)
      assert b"\x1b[0;38;5;197mHello" in f.data
      assert b"\x1b[0;38;5;83;3mworld" in f.data
  
file_path: catboost/contrib/python/prompt-toolkit/py2/tests/test_print_tokens.py
imports: from __future__ import unicode_literals
  from prompt_toolkit.shortcuts import print_tokens
  from prompt_toolkit.token import Token
  from prompt_toolkit.styles import style_from_dict
label_desc: Use image node_id 2 for calling a global function with example usage: test_with_style() without return types