code: def test_palette(method, color):
      im = Image.new(
          "RGBA" if len(color) == 4 else "RGB", (1, 1), color
      )
  
      converted = im.quantize(method=method)
      converted_px = converted.load()
      assert converted_px[0, 0] == converted.palette.colors[color]
  
file_path: pillow-simd/Tests/test_image_quantize.py
imports: import pytest
  from PIL import Image
  from .helper import assert_image_similar, hopper, is_ppc64le
label_desc: Use image node_id 10 for calling a global function with example usage: test_palette(method, color) without return types