code: def test_cubehelix_code(self):
      color_palette = palettes.color_palette
      cubehelix_palette = palettes.cubehelix_palette
  
      pal1 = color_palette("ch:", 8)
      pal2 = color_palette(cubehelix_palette(8))
      assert pal1 == pal2
  
      pal1 = color_palette("ch:.5, -.25,hue = .5,light=.75", 8)
      pal2 = color_palette(
          cubehelix_palette(8, 0.5, -0.25, hue=0.5, light=0.75)
      )
      assert pal1 == pal2
  
      pal1 = color_palette("ch:h=1,r=.5", 9)
      pal2 = color_palette(cubehelix_palette(9, hue=1, rot=0.5))
      assert pal1 == pal2
  
      pal1 = color_palette("ch:_r", 6)
      pal2 = color_palette(cubehelix_palette(6, reverse=True))
      assert pal1 == pal2
  
      pal1 = color_palette("ch:_r", as_cmap=True)
      pal2 = cubehelix_palette(6, reverse=True, as_cmap=True)
      assert pal1(0.5) == pal2(0.5)
  
imports: import colorsys
  import numpy
  import matplotlib
  import pytest
  import numpy.testing
  from seaborn import palettes, utils, rcmod
  from seaborn.external import husl
  from seaborn._compat import get_colormap
  from seaborn.colors import xkcd_rgb, crayons
label_desc: Use image node_id 31 for calling the TestColorPalettes obj's underlying member method code with example usage: obj.test_cubehelix_code() without return types