code: def fragment_list_width(fragments: StyleAndTextTuples) -> int:
      """
      Return the character width of this text fragment list.
      (Take double width characters into account.)
  
      :param fragments: List of ``(style_str, text)`` or
          ``(style_str, text, mouse_handler)`` tuples.
      """
      ZeroWidthEscape = "[ZeroWidthEscape]"
      return sum(
          get_cwidth(c)
          for item in fragments
          for c in item[1]
          if ZeroWidthEscape not in item[0]
      )
  
file_path: catboost/contrib/python/prompt-toolkit/py3/prompt_toolkit/formatted_text/utils.py
imports: from __future__ import annotations
  from typing import Iterable, cast
  from prompt_toolkit.utils import get_cwidth
  from .base import AnyFormattedText, OneStyleAndTextTuple, StyleAndTextTuples, to_formatted_text
label_desc: Use image node_id 3 for calling a global function with example usage: fragment_list_width(fragments) and returns: sum