code: def test_wrong_mode():
      lut = ImageMorph.LutBuilder(op_name="corner").build_lut()
      imrgb = Image.new("RGB", (10, 10))
      iml = Image.new("L", (10, 10))
  
      with pytest.raises(RuntimeError):
          _imagingmorph.apply(bytes(lut), imrgb.im.id, iml.im.id)
  
      with pytest.raises(RuntimeError):
          _imagingmorph.apply(bytes(lut), iml.im.id, imrgb.im.id)
  
      with pytest.raises(RuntimeError):
          _imagingmorph.match(bytes(lut), imrgb.im.id)
  
      # Should not raise
      _imagingmorph.match(bytes(lut), iml.im.id)
  
imports: from __future__ import annotations
  import pytest
  from PIL import Image, ImageMorph, _imagingmorph
  from .helper import assert_image_equal_tofile, hopper
label_desc: Use image node_id 22 for calling a global function with example usage: test_wrong_mode() without return types