class_docstr: Tests the color_palette function.
docstr: Test palette length is preserved when modified
docstr_tok: ["Test","palette","length","is","preserved","when","modified"]
code: def test_preserved_palette_length(self):
      """
      Test palette length is preserved when modified
      """
      pal_in = color_palette("Set1", 10)
      pal_out = color_palette(pal_in)
      assert pal_in == pal_out
  
imports: import pytest
  import numpy
  import matplotlib
  from yellowbrick.exceptions import *
  from yellowbrick.style.palettes import *
  from yellowbrick.style.colors import get_color_cycle
  from yellowbrick.style.rcmod import set_aesthetic, set_palette
  from yellowbrick.style.palettes import color_sequence, color_palette
  from yellowbrick.style.palettes import ColorPalette, PALETTES, SEQUENCES
  from tests.base import VisualTestCase
label_desc: Use image node_id 14 for calling the TestColorPaletteFunction obj's underlying member method code with example usage: obj.test_preserved_palette_length() without return types