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