code: def test_unsupported_modes(mode):
      im = Image.new("P", (10, 10))
      with pytest.raises(ValueError):
          im.reduce(3)
  
imports: from __future__ import annotations
  import pytest
  from PIL import Image, ImageMath, ImageMode
  from .helper import convert_to_comparable, skip_unless_feature
label_desc: Use image node_id 5 for calling a global function with example usage: test_unsupported_modes(mode) without return types