class_docstr: A piece of text with associated style. Segments are produced by the Console render process and
  are ultimately converted in to strings to be written to the terminal.
  
  Args:
      text (str): A piece of text.
      style (:class:`~rich.style.Style`, optional): An optional style to apply to the text.
      control (Tuple[ControlCode], optional): Optional sequence of control codes.
  
  Attributes:
      cell_length (int): The cell length of this Segment.
docstr: Get the length of list of segments.
  
  Args:
      line (List[Segment]): A line encoded as a list of Segments (assumes no '\\n' characters),
  
  Returns:
      int: The length of the line.
docstr_tok: ["Get","the","length","of","list","of","segments",".","Args",":","line","(","List","[","Segment","]",")",":","A","line","encoded","as","a","list","of","Segments","(","assumes","no","'\\\\n","'","characters",")",",","Returns",":","int",":","The","length","of","the","line","."]
code: def get_line_length(cls, line: List["Segment"]) -> int:
      """Get the length of list of segments.
  
      Args:
          line (List[Segment]): A line encoded as a list of Segments (assumes no '\\\\n' characters),
  
      Returns:
          int: The length of the line.
      """
      _cell_len = cell_len
      return sum(
          _cell_len(text)
          for text, style, control in line
          if not control
      )
  
imports: from enum import IntEnum
  from functools import lru_cache
  from itertools import filterfalse
  from logging import getLogger
  from operator import attrgetter
  from typing import TYPE_CHECKING, Dict, Iterable, List, NamedTuple, Optional, Sequence, Tuple, Type, Union
  from .cells import _is_single_cell_widths, cached_cell_len, cell_len, get_character_cell_size, set_cell_size
  from .repr import Result, rich_repr
  from .style import Style
label_desc: Use image node_id 13 for calling the Segment obj's underlying member method code with example usage: obj.get_line_length(cls, line) and returns: sum