code: def forward(self, inputs):
      self.retain_inputs((0, 1))
      y, gy = inputs
      xp = backend.get_array_module(*y)
      if xp is cuda.cupy and chainer.should_use_cudnn(">=auto"):
          gx = cudnn.softmax_backward(y, gy, self.axis, _algorithm)
      else:
          gx = y * gy
          sumdx = gx.sum(axis=self.axis, keepdims=True)
          gx -= y * sumdx
  
      return (gx,)
  
file_path: chainer/chainer/functions/activation/softmax.py
imports: import chainer
  from chainer import backend
  from chainer.backends import cuda
  from chainer import function_node
  import chainer.functions
  from chainer.utils import type_check
label_desc: Use image node_id 2 for calling the _SoftmaxGrad obj's underlying member method code with example usage: obj.forward(inputs) and returns: gx