code: def test_compare_w_ndimage():
      from scipy import ndimage
  
      A = np.arange(34 * 340, dtype="float64").reshape((34, 340)) % 3
      B = np.ones((3, 3), A.dtype)
      for mode in mahotas._filters.modes:
          if mode == "ignore":
              continue
          assert np.all(
              mahotas.convolve(A, B, mode=mode)
              == ndimage.convolve(A, B, mode=mode)
          )
  
imports: import numpy
  import mahotas
  import mahotas.convolve
  import mahotas
  from mahotas.convolve import convolve1d, gaussian_filter
  import mahotas._filters
  from mahotas.tests.utils import luispedro_jpg
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: test_compare_w_ndimage() without return types