code: def create_link(self, rng=None):
      if rng is None:
          rng = numpy.random.RandomState()
      link = links.NegativeSampling(
          self.in_size, [10, 5, 2, 5, 2], self.sample_size
      )
      link.cleargrads()
      # W is initialized with zero. Inject random values for meaningful test.
      link.W.array[:] = rng.uniform(-1, 1, link.W.shape)
      return link
  
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 3 for calling the TestNegativeSampling obj's underlying member method code with example usage: obj.create_link(rng) and returns: link