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: Check if the segment contains text.
docstr_tok: ["Check","if","the","segment","contains","text","."]
code: def __bool__(self) -> bool:
      """Check if the segment contains text."""
      return bool(self.text)
  
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 3 for calling the Segment obj's underlying member method code with example usage: obj.__bool__() and returns: bool