code: def test_validate_scale_values(self):
      # test that scale length is at least 2
      scale = [0]
  
      pattern = (
          "You must input a list of scale values that has at least "
          "two values."
      )
  
      self.assertRaisesRegex(
          PlotlyError, pattern, colors.validate_scale_values, scale
      )
  
      # test if first and last number is 0 and 1 respectively
      scale = [0, 1.1]
  
      pattern = (
          "The first and last number in your scale must be 0.0 and "
          "1.0 respectively."
      )
  
      self.assertRaisesRegex(
          PlotlyError, pattern, colors.validate_scale_values, scale
      )
  
      # test numbers increase
      scale = [0, 2, 1]
  
      pattern = (
          "'scale' must be a list that contains a strictly "
          "increasing sequence of numbers."
      )
  
      self.assertRaisesRegex(
          PlotlyError, pattern, colors.validate_scale_values, scale
      )
  
file_path: plotly.py/packages/python/plotly/plotly/tests/test_core/test_colors/test_colors.py
imports: from unittest import TestCase
  import plotly.tools
  from plotly.exceptions import PlotlyError
  import plotly.colors
label_desc: Use image node_id 4 for calling the TestColors obj's underlying member method code with example usage: obj.test_validate_scale_values() without return types