code: def maximum_filter(
      input,
      size=None,
      footprint=None,
      output=None,
      mode="reflect",
      cval=0.0,
      origin=0,
  ):
      """Calculate a multidimensional maximum filter.
  
      Parameters
      ----------
      %(input)s
      %(size_foot)s
      %(output)s
      %(mode_multiple)s
      %(cval)s
      %(origin_multiple)s
  
      Returns
      -------
      maximum_filter : ndarray
          Filtered array. Has the same shape as `input`.
  
      Notes
      -----
      A sequence of modes (one per axis) is only supported when the footprint is
      separable. Otherwise, a single mode string must be provided.
  
      Examples
      --------
      >>> from scipy import ndimage, misc
      >>> import matplotlib.pyplot as plt
      >>> fig = plt.figure()
      >>> plt.gray()  # show the filtered result in grayscale
      >>> ax1 = fig.add_subplot(121)  # left side
      >>> ax2 = fig.add_subplot(122)  # right side
      >>> ascent = misc.ascent()
      >>> result = ndimage.maximum_filter(ascent, size=20)
      >>> ax1.imshow(ascent)
      >>> ax2.imshow(result)
      >>> plt.show()
      """
      return _min_or_max_filter(
          input, size, footprint, None, output, mode, cval, origin, 0
      )
  
imports: from collections.abc import Iterable
  import warnings
  import numpy
  import operator
  from numpy.core.multiarray import normalize_axis_index
  from .None import _ni_support
  from .None import _nd_image
  from .None import _ni_docstrings
label_desc: Use image node_id 24 for calling a global function with example usage: maximum_filter(input, size, footprint, output, mode, cval, origin) and returns: _min_or_max_filter