code: def test_dilate_erode():
      A = np.zeros((128, 128), dtype=bool)
      Bc = np.array([[0, 1, 0], [1, 1, 1], [0, 1, 0]], bool)
      A[32, 32] = True
      origs = []
      for i in range(12):
          origs.append(A.copy())
          A = mahotas.dilate(A, Bc)
      for i in range(12):
          A = mahotas.erode(A, Bc)
          assert np.all(A == origs[-i - 1])
  
file_path: mahotas/mahotas/tests/test_dilate_erode.py
imports: import numpy
  import mahotas
  import mahotas
label_desc: Use image node_id 2 for calling a global function with example usage: test_dilate_erode() without return types