code: def _normalize_tuple(
      color: ColorTuple,
      rgb_formatter: Callable[[float, MaybeColor], float],
      alpha_formatter: Callable[[float, MaybeColor], float],
  ) -> ColorTuple:
      """Parse color tuple using the specified color formatters.
  
      The R, G, B components are transformed by rgb_formatter, and the alpha component is transformed
      by alpha_formatter.
  
      For example, to output a (float, float, float, int) color tuple, set rgb_formatter
      to _float_formatter and alpha_formatter to _int_formatter.
      """
      if len(color) == 3:
          r = rgb_formatter(color[0], color)
          g = rgb_formatter(color[1], color)
          b = rgb_formatter(color[2], color)
          return r, g, b
  
      elif len(color) == 4:
          color_4tuple = cast(Color4Tuple, color)
          r = rgb_formatter(color_4tuple[0], color_4tuple)
          g = rgb_formatter(color_4tuple[1], color_4tuple)
          b = rgb_formatter(color_4tuple[2], color_4tuple)
          alpha = alpha_formatter(color_4tuple[3], color_4tuple)
          return r, g, b, alpha
  
      raise InvalidColorException(color)
  
file_path: streamlit/lib/streamlit/color_util.py
imports: from typing import Any, Callable, Collection, Tuple, Union, cast
  from typing_extensions import TypeAlias
  from streamlit.errors import StreamlitAPIException
label_desc: Use image node_id 9 for calling a global function with example usage: _normalize_tuple(color, rgb_formatter, alpha_formatter) and returns: r,  g,  b, r,  g,  b,  alpha