code: def test_corner():
      # Create a corner detector pattern
      mop = ImageMorph.MorphOp(
          patterns=["1:(... ... ...)->0", "4:(00. 01. ...)->1"]
      )
      count, Aout = mop.apply(A)
      assert count == 5
      assert_img_equal_img_string(
          Aout,
          """
                                       .......
                                       .......
                                       ..1.1..
                                       .......
                                       ..1.1..
                                       .......
                                       .......
                                       """,
      )
  
      # Test the coordinate counting with the same operator
      coords = mop.match(A)
      assert len(coords) == 4
      assert tuple(coords) == ((2, 2), (4, 2), (2, 4), (4, 4))
  
      coords = mop.get_on_pixels(Aout)
      assert len(coords) == 4
      assert tuple(coords) == ((2, 2), (4, 2), (2, 4), (4, 4))
  
imports: import pytest
  from PIL import Image, ImageMorph, _imagingmorph
  from .helper import assert_image_equal_tofile, hopper
label_desc: Use image node_id 14 for calling a global function with example usage: test_corner() without return types