code: def sample_for_test(self):
      obo_p = self.p.reshape(-1, self.k)
      obo_n = self.n.reshape(-1)
      smp = [
          _numpy_random_multinomial(
              one_n, one_p, size=self.sample_shape
          )
          for one_n, one_p in zip(obo_n, obo_p)
      ]
      smp = _numpy_stack(smp, axis=-2)
      smp = smp.reshape(self.sample_shape + self.shape + (self.k,))
      return smp
  
file_path: chainer/tests/chainer_tests/distributions_tests/test_one_hot_categorical.py
imports: import numpy
  from chainer import cuda
  from chainer import distributions
  from chainer import testing
label_desc: Use image node_id 2 for calling the TestOneHotCategorical obj's underlying member method code with example usage: obj.sample_for_test() and returns: smp