code: def setUp(self):
      self._config_user = chainer.using_config("dtype", self.dtype)
      self._config_user.__enter__()
  
      batch = len(self.t)
      x_shape = (batch, self.in_size)
      self.x = numpy.random.uniform(-1, 1, x_shape).astype(self.dtype)
      self.t = numpy.array(self.t).astype(numpy.int32)
  
      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)
  
      if self.dtype == numpy.float16:
          self.test_forward_options = {"atol": 1e-2}
          self.test_backward_options = {"atol": 5e-3}
      else:
          self.test_forward_options = {}
          self.test_backward_options = {"atol": 1e-4}
  
file_path: chainer/tests/chainer_tests/links_tests/loss_tests/test_negative_sampling.py
imports: import unittest
  import numpy
  import chainer
  from chainer import backend
  from chainer.backend import CpuDevice
  from chainer import links
  from chainer import testing
label_desc: Use image node_id 1 for calling the TestNegativeSampling obj's underlying member method code with example usage: obj.setUp() without return types