code: def forward_expected(self, inputs):
      (x,) = inputs
      expected = numpy.exp(x)
      expected = numpy.rollaxis(expected, self.axis, expected.ndim)
      for i in numpy.ndindex(expected.shape[:-1]):
          expected[i] /= expected[i].sum()
      expected = numpy.rollaxis(expected, expected.ndim - 1, self.axis)
      return (expected.astype(x.dtype),)
  
file_path: chainer/tests/chainer_tests/functions_tests/activation_tests/test_softmax.py
imports: import unittest
  import numpy
  import chainer
  from chainer.backends import cuda
  from chainer import functions
  from chainer import testing
  from chainer.testing import attr
label_desc: Use image node_id 4 for calling the TestSoftmax obj's underlying member method code with example usage: obj.forward_expected(inputs) and returns: expected