class_docstr: Cumulative prod of array elements over a given axis.
class_docstr_tok: ["Cumulative","prod","of","array","elements","over","a","given","axis","."]
code: def backward(self, indexes, grad_outputs):
      (x,) = self.get_retained_inputs()
      xp = backend.get_array_module(x)
      (y,) = self.get_retained_outputs()
      (gy,) = grad_outputs
      F = chainer.functions
  
      axis = self.axis
      if axis is None:
          shape = x.shape
          axis = 0
          x = F.flatten(x)
      else:
          shape = None
          if axis < 0:
              axis += y.ndim
  
      if y.shape[axis] <= 1:
          gx = gy
      else:
          _, x = F.split_axis(x, (1,), axis)
          gx = _flipcumprodsum(x, gy, axis)
          y, ylast = F.split_axis(y, (-1,), axis)
          gx *= F.concat([xp.ones_like(ylast.array), y], axis=axis)
      if shape is not None:
          gx = F.reshape(gx, shape)
      return (gx,)
  
file_path: chainer/chainer/functions/math/cumprod.py
imports: import six
  import chainer
  from chainer import backend
  from chainer import function_node
  from chainer.functions.array import flip
  from chainer.utils import type_check
label_desc: Use image node_id 4 for calling the Cumprod obj's underlying member method code with example usage: obj.backward(indexes, grad_outputs) and returns: gx