code: def forward_cpu(self, inputs):
      self.retain_inputs((0, 1, 2))
      x, t, W = inputs
  
      self.ignore_mask = t != self.ignore_label
      samples = self._make_samples(t)
  
      w = W[samples]
      wx = numpy.einsum(
          "ij,ikj->ik", x[self.ignore_mask], w[self.ignore_mask]
      )
      wx[:, 0] *= -1
  
      loss = numpy.zeros(len(x), x.dtype)
      loss[self.ignore_mask] = numpy.sum(numpy.logaddexp(wx, 0), axis=1)
  
      if self.reduce == "sum":
          loss = numpy.array(loss.sum(), x.dtype)
  
      self.samples = samples
      return (loss,)
  
imports: import numpy
  import six
  import chainer
  from chainer import backend
  from chainer.backends import cuda
  from chainer import function_node
  from chainer import utils
  from chainer.utils import argument
  from chainer.utils import precision
  from chainer.utils import type_check
label_desc: Use image node_id 4 for calling the NegativeSamplingFunction obj's underlying member method code with example usage: obj.forward_cpu(inputs) and returns: loss