code: def test_backward(self, backend_config):
      sampler = make_sampler(backend_config, self.label_size)
      x_data = backend_config.get_array(self.x)
      t_data = backend_config.get_array(self.t)
      w_data = backend_config.get_array(self.w)
      y_grad = backend_config.get_array(self.gy)
  
      def f(x, w):
          return functions.negative_sampling(
              x,
              t_data,
              w,
              sampler,
              self.sample_size,
              reduce=self.reduce,
          )
  
      with backend_config:
          gradient_check.check_backward(
              f, (x_data, w_data), y_grad, **self.check_backward_options
          )
  
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 3 for calling the TestNegativeSamplingFunction obj's underlying member method code with example usage: obj.test_backward(backend_config) and returns: functions