code: def test_average_filter(self):
      i = numpy.array([[1, 2, 3], [3, 4, 5], [5, 6, 7]])
  
      fp = numpy.array([[1, 1]])
      e = numpy.array([[3, 5, 3], [7, 9, 5], [11, 13, 7]])
      r = average_filter(
          i, footprint=fp, mode="constant", cval=0, output=float
      )
      numpy.testing.assert_allclose(r, e / 2.0)
  
      r = average_filter(
          i, footprint=fp, mode="constant", cval=0, output=int
      )
      numpy.testing.assert_allclose(r, e / 2)
  
      r = average_filter(i, footprint=fp, mode="constant", cval=0)
      numpy.testing.assert_allclose(r, e / 2)
  
      fp = numpy.array([[1, 0], [1, 0], [0, 1]])
      e = numpy.array([[5, 7, 3], [10, 13, 8], [8, 10, 12]])
      r = average_filter(
          i, footprint=fp, mode="constant", cval=0, output=float
      )
      numpy.testing.assert_allclose(r, e / 3.0)
  
      i = numpy.array([[1, 3, 4], [2, 2, 2]])
      fp = numpy.array([[1, 0, 1]])
      e = numpy.array([[6, 5, 6], [4, 4, 4]])
      r = average_filter(i, footprint=fp, mode="mirror", output=float)
      numpy.testing.assert_allclose(r, e / 2.0)
  
      e = numpy.array([[4, 5, 7], [4, 4, 4]])
      r = average_filter(i, footprint=fp, mode="reflect", output=float)
      numpy.testing.assert_allclose(r, e / 2.0)
  
file_path: medpy/tests/filter_/image.py
imports: import unittest
  import numpy
  from medpy.filter.image import ssd, sls, sum_filter, average_filter
  from scipy.ndimage import gaussian_filter
label_desc: Use image node_id 4 for calling the TestMetrics obj's underlying member method code with example usage: obj.test_average_filter() without return types