code: def test_interp_palette() -> None:
      # Constant alpha
      assert pal.interp_palette(("black", "red"), 0) == ()
      assert pal.interp_palette(("black", "red"), 1) == ("#000000",)
      assert pal.interp_palette(("black", "red"), 2) == (
          "#000000",
          "#ff0000",
      )
      assert pal.interp_palette(("black", "red"), 3) == (
          "#000000",
          "#7f0000",
          "#ff0000",
      )
      assert pal.interp_palette(("black", "red"), 4) == (
          "#000000",
          "#550000",
          "#aa0000",
          "#ff0000",
      )
  
      # Varying alpha
      assert pal.interp_palette(("#00ff0080", "#00ffff40"), 1) == (
          "#00ff0080",
      )
      assert pal.interp_palette(("#00ff0080", "#00ffff40"), 2) == (
          "#00ff0080",
          "#00ffff40",
      )
      assert pal.interp_palette(("#00ff0080", "#00ffff40"), 3) == (
          "#00ff0080",
          "#00ff7f60",
          "#00ffff40",
      )
      assert pal.interp_palette(("#00ff0080", "#00ffff40"), 4) == (
          "#00ff0080",
          "#00ff556b",
          "#00ffaa55",
          "#00ffff40",
      )
  
      # Passing single color palette
      assert pal.interp_palette(("red",), 0) == ()
      assert pal.interp_palette(("red",), 1) == ("#ff0000",)
      assert pal.interp_palette(("red",), 2) == ("#ff0000", "#ff0000")
  
      with pytest.raises(ValueError):
          pal.interp_palette((), 1)
  
      with pytest.raises(ValueError):
          pal.interp_palette(("black", "red"), -1)
  
file_path: bokeh/tests/unit/bokeh/test_palettes.py
imports: from __future__ import annotations
  import pytest
  import bokeh.palettes
label_desc: Use image node_id 4 for calling a global function with example usage: test_interp_palette() without return types