code: def _expand_classname(classname: str) -> list[str]:
      """
      Split a single class name at the `.` operator, and build a list of classes.
  
      E.g. 'a.b.c' becomes ['a', 'a.b', 'a.b.c']
      """
      result = []
      parts = classname.split(".")
  
      for i in range(1, len(parts) + 1):
          result.append(".".join(parts[:i]).lower())
  
      return result
  
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 2 for calling a global function with example usage: _expand_classname(classname) and returns: result