code: def test_scale_manual():
      def is_manual_scale(name):
          return name.startswith("scale_") and name.endswith("_manual")
  
      manual_scales = [
          getattr(scale_manual, name)
          for name in scale_manual.__dict__
          if is_manual_scale(name)
      ]
  
      values = [1, 2, 3, 4, 5]
      for _scale in manual_scales:
          s = _scale(values)
          assert s.palette(2) == values
          assert s.palette(len(values)) == values
          with pytest.warns(PlotnineWarning):
              s.palette(len(values) + 1)
  
      values = {"A": "red", "B": "violet", "C": "blue"}
      sc = scale_manual.scale_color_manual(values)
      assert sc.palette(3) == values
  
      # Breaks are matched with values
      sc1 = scale_manual.scale_color_manual(
          breaks=[True, False], values=["blue", "red"]
      )
      sc2 = scale_manual.scale_color_manual(
          breaks=[True, False], values=["red", "blue"]
      )
      assert sc1.map([True, False, True, False]) == ["blue", "red"] * 2
      assert sc2.map([True, False, True, False]) == ["red", "blue"] * 2
  
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 9 for calling a global function with example usage: test_scale_manual() and returns: unknown