code: def test_sobel():
      I = np.array(
          [
              [0, 0, 0, 0, 0, 0],
              [0, 0, 0, 1, 0, 0],
              [0, 0, 0, 1, 0, 0],
              [0, 0, 0, 1, 0, 0],
              [0, 0, 0, 1, 0, 0],
              [0, 0, 0, 0, 0, 0],
          ]
      )
      E = sobel(I)
      r, c = I.shape
      for y, x in zip(*np.where(E)):
          N = [I[y, x]]
          if y > 0:
              N.append(I[y - 1, x])
          if x > 0:
              N.append(I[y, x - 1])
          if y < (r - 1):
              N.append(I[y + 1, x])
          if x < (c - 1):
              N.append(I[y, x + 1])
          assert len(set(N)) > 1
  
file_path: mahotas/mahotas/tests/test_edge.py
imports: from mahotas.edge import sobel
  import pytest
  import mahotas
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: test_sobel() without return types