code: def maximum(input, labels=None, index=None):
      """Calculate the maximum of the values of an array over labeled regions.
  
      Args:
          input (cupy.ndarray):
              Array of values. For each region specified by `labels`, the
              maximal values of `input` over the region is computed.
          labels (cupy.ndarray, optional): An array of integers marking different
              regions over which the maximum value of `input` is to be computed.
              `labels` must have the same shape as `input`. If `labels` is not
              specified, the maximum over the whole array is returned.
          index (array_like, optional): A list of region labels that are taken
              into account for computing the maxima. If `index` is None, the
              maximum over all elements where `labels` is non-zero is returned.
  
      Returns:
          cupy.ndarray: Array of maxima of `input` over the regions
          determaxed by `labels` and whose index is in `index`. If `index` or
          `labels` are not specified, a 0-dimensional cupy.ndarray is
          returned: the maximal value of `input` if `labels` is None,
          and the maximal value of elements where `labels` is greater than
          zero if `index` is None.
  
      .. seealso:: :func:`scipy.ndimage.maximum`
      """
      return _select(input, labels, index, find_max=True)[0]
  
imports: import warnings
  import numpy
  import cupy
  from cupy import _core
  from cupy import _util
label_desc: Use image node_id 23 for calling a global function with example usage: maximum(input, labels, index) and returns: _select