code: def forward_expected(self, inputs):
      x, w = inputs
      if not self.use_weights:
          w = None
      y_expect = numpy.average(x, axis=self.axis, weights=w)
      if self.keepdims:
          # numpy.average does not support keepdims
          axis = self.axis
          if axis is None:
              axis = list(six.moves.range(x.ndim))
          elif isinstance(axis, int):
              axis = (axis,)
          shape = list(x.shape)
          for i in six.moves.range(len(shape)):
              if i in axis or i - len(shape) in axis:
                  shape[i] = 1
          y_expect = y_expect.reshape(shape)
      y_expect = utils.force_array(y_expect, dtype=self.dtype)
      return (y_expect,)
  
imports: import unittest
  import numpy
  import six
  from chainer import functions
  from chainer import testing
  from chainer.testing import attr
  from chainer import utils
label_desc: Use image node_id 5 for calling the TestAverage obj's underlying member method code with example usage: obj.forward_expected(inputs) and returns: y_expect