code: def to_rgba_array(palette: Palette) -> npt.NDArray[np.uint8]:
      """Convert palette to a numpy array of uint8 RGBA components."""
      rgba_array = np.empty((len(palette), 4), dtype=np.uint8)
  
      for i, color in enumerate(palette):
          rgba = NamedColor.from_string(color)
          rgba_array[i] = (rgba.r, rgba.g, rgba.b, rgba.a * 255)
  
      return rgba_array
  
file_path: bokeh/src/bokeh/palettes.py
imports: from __future__ import annotations
  import logging
  import math
  from copy import deepcopy
  from typing import TYPE_CHECKING
  import numpy
  from .colors.util import RGB, NamedColor
label_desc: Use image node_id 13 for calling a global function with example usage: to_rgba_array(palette) and returns: rgba_array