code: def _bwd_segment_cmp(feat, arg, m):
      r"""Backward phase of segment reduction (for 'min'/'max' reduction).
  
      It computes the gradient of input feature given output gradient of
      the segment reduction result.
  
      Parameters
      ----------
      feat : Tensor
          The output gradient
      arg : Tensor
          The ArgMin/Max tensor produced by segment_reduce op.
      m : int
          The length of input gradients' first dimension.
  
      Returns
      -------
      Tensor
          The input gradient.
      """
      out_shp = (m,) + F.shape(feat)[1:]
      ctx = F.context(feat)
      dtype = F.dtype(feat)
      out = F.zeros(out_shp, dtype, ctx)
      _CAPI_DGLKernelBwdSegmentCmp(
          to_dgl_nd(feat), to_dgl_nd(arg), to_dgl_nd_for_write(out)
      )
      return out
  
imports: from __future__ import absolute_import
  from .None import backend, ndarray
  from ._ffi.function import _init_api
  from .base import DGLError
label_desc: Use image node_id 18 for calling a global function with example usage: _bwd_segment_cmp(feat, arg, m) and returns: out