class_docstr: Merge multiple `Style` objects into one.
  This is supposed to ensure consistency: if any of the given styles changes,
  then this style will be updated.
class_docstr_tok: ["Merge","multiple","`","Style","`","objects","into","one",".","This","is","supposed","to","ensure","consistency",":","if","any","of","the","given","styles","changes",",","then","this","style","will","be","updated","."]
code: def __init__(self, styles: list[BaseStyle]) -> None:
      self.styles = styles
      self._style: SimpleCache[Hashable, Style] = SimpleCache(maxsize=1)
  
imports: from __future__ import annotations
  import itertools
  import re
  from enum import Enum
  from typing import Hashable, TypeVar
  from prompt_toolkit.cache import SimpleCache
  from .base import ANSI_COLOR_NAMES, ANSI_COLOR_NAMES_ALIASES, DEFAULT_ATTRS, Attrs, BaseStyle
  from .named_colors import NAMED_COLORS
label_desc: Use image node_id 1 to create a new _MergedStyle object from inherited base classes: BaseStyle with example: obj = _MergedStyle(styles)