code: def test_libimagequant_quantize():
      image = hopper()
      try:
          converted = image.quantize(100, Image.LIBIMAGEQUANT)
      except ValueError as ex:  # pragma: no cover
          if "dependency" in str(ex).lower():
              pytest.skip("libimagequant support not available")
          else:
              raise
      assert converted.mode == "P"
      assert_image_similar(converted.convert("RGB"), image, 15)
      assert len(converted.getcolors()) == 100
  
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 2 for calling a global function with example usage: test_libimagequant_quantize() without return types