code: def setUp(self):
      batch = len(self.t)
      x_shape = (batch, self.in_size)
      w_shape = (self.label_size, self.in_size)
  
      self.x = numpy.random.uniform(-1, 1, x_shape).astype(self.dtype)
      self.t = numpy.array(self.t).astype(numpy.int32)
      self.w = numpy.random.uniform(-1, 1, w_shape).astype(self.dtype)
  
      if self.reduce == "no":
          g_shape = self.t.shape
      elif self.reduce == "sum":
          g_shape = ()
  
      self.gy = numpy.random.uniform(-1, 1, g_shape).astype(self.dtype)
  
      self.ggx = numpy.random.uniform(-1, 1, x_shape).astype(self.dtype)
      self.ggw = numpy.random.uniform(-1, 1, w_shape).astype(self.dtype)
  
      self.check_forward_options = {}
      self.check_backward_options = {
          "eps": 1e-2,
          "atol": 5e-4,
          "rtol": 5e-3,
      }
      self.check_double_backward_options = {
          "eps": 1e-2,
          "atol": 1e-3,
          "rtol": 1e-2,
      }
      if self.dtype == numpy.float16:
          self.check_forward_options.update(
              {"atol": 1e-3, "rtol": 1e-3}
          )
          self.check_backward_options.update(
              {"rtol": 5e-2, "dtype": numpy.float64}
          )
          self.check_double_backward_options.update(
              {"dtype": numpy.float64}
          )
  
imports: import unittest
  import numpy
  import pytest
  import six
  import chainer
  from chainer.backend import CpuDevice
  from chainer.backends import cuda
  from chainer import functions
  from chainer.functions.loss import negative_sampling
  from chainer import gradient_check
  from chainer import testing
  from chainer.testing import attr
label_desc: Use image node_id 1 for calling the TestNegativeSamplingFunction obj's underlying member method code with example usage: obj.setUp() without return types