code: def test_sanity():
      palette = ImagePalette.ImagePalette("RGB", list(range(256)) * 3)
      assert len(palette.colors) == 256
  
      with pytest.warns(DeprecationWarning):
          with pytest.raises(ValueError):
              ImagePalette.ImagePalette("RGB", list(range(256)) * 3, 10)
  
file_path: pillow-simd/Tests/test_imagepalette.py
imports: import pytest
  from PIL import Image, ImagePalette
  from .helper import assert_image_equal, assert_image_equal_tofile
label_desc: Use image node_id 1 for calling a global function with example usage: test_sanity() without return types