code: def test_usm_formats(test_images):
      im = test_images["im"]
  
      usm = ImageFilter.UnsharpMask
      with pytest.raises(ValueError):
          im.convert("1").filter(usm)
      im.convert("L").filter(usm)
      with pytest.raises(ValueError):
          im.convert("I").filter(usm)
      with pytest.raises(ValueError):
          im.convert("F").filter(usm)
      im.convert("RGB").filter(usm)
      im.convert("RGBA").filter(usm)
      im.convert("CMYK").filter(usm)
      with pytest.raises(ValueError):
          im.convert("YCbCr").filter(usm)
  
file_path: pillow/Tests/test_imageops_usm.py
imports: from __future__ import annotations
  import pytest
  from PIL import Image, ImageFilter
label_desc: Use image node_id 3 for calling a global function with example usage: test_usm_formats(test_images) without return types