code: def test_continuous_color_palettes():
      alpha = 0.6
      alphas = [0.1, 0.9, 0.32, 1.0, 0.65]
      colors1 = ["#000000", "#11BB20"]
      colors2 = ["#000000", "#003399", "#42BF63", "#191141"]
      sc = scale_color
  
      def _assert(cscale):
          """
          Make color scale palette returns a single color when
          passed a scalar and multiple colors when
          passed a list
          """
          color = cscale.palette(alpha)
          assert color[0][0] == "#"
  
          colors = cscale.palette(alphas)
          assert all(c[0] == "#" for c in colors)
  
      s = sc.scale_color_gradient()
      _assert(s)
  
      s = sc.scale_color_gradient2()
      _assert(s)
  
      s = sc.scale_color_gradientn(colors1)
      _assert(s)
  
      s = sc.scale_color_gradientn(colors2)
      _assert(s)
  
      s = sc.scale_color_distiller(type="seq")
      _assert(s)
  
      s = sc.scale_color_distiller(type="div")
      _assert(s)
  
      with pytest.warns(PlotnineWarning):
          s = sc.scale_color_distiller(type="qual")
      _assert(s)
  
imports: import warnings
  from datetime import datetime
  import numpy
  import numpy.testing
  import pandas
  import pytest
  import plotnine
  from plotnine import aes, annotate, element_text, expand_limits, facet_wrap, geom_bar, geom_col, geom_point, ggplot, lims, theme
  from plotnine.exceptions import PlotnineError, PlotnineWarning
  from plotnine.scales import scale_color, scale_color_manual, scale_identity, scale_manual, scale_xy
  from plotnine.scales.scale_alpha import scale_alpha_continuous, scale_alpha_discrete
  from plotnine.scales.scale_linetype import scale_linetype_continuous, scale_linetype_discrete
  from plotnine.scales.scale_manual import _scale_manual
  from plotnine.scales.scale_shape import scale_shape_continuous, scale_shape_discrete
  from plotnine.scales.scale_size import scale_size_area, scale_size_continuous, scale_size_discrete, scale_size_radius
  from plotnine.scales.scale_xy import scale_x_continuous, scale_x_discrete, scale_x_log10, scale_y_continuous
  from plotnine.scales.scales import make_scale
label_desc: Use image node_id 2 for calling a global function with example usage: test_continuous_color_palettes() without return types