code: def merge_styles(styles: list[BaseStyle]) -> _MergedStyle:
      """
      Merge multiple `Style` objects.
      """
      styles = [s for s in styles if s is not None]
      return _MergedStyle(styles)
  
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 5 for calling a global function with example usage: merge_styles(styles) and returns: _MergedStyle