code: def testSample(self):
      temperature = 1.4
      # single logit
      logits = [0.3, 0.1, 0.4]
      dist = roc.RelaxedOneHotCategorical(
          temperature, logits, validate_args=True
      )
      self.assertAllEqual(
          [3],
          self.evaluate(dist.sample(seed=test_util.test_seed())).shape,
      )
      self.assertAllEqual(
          [5, 3],
          self.evaluate(
              dist.sample(5, seed=test_util.test_seed())
          ).shape,
      )
      # multiple distributions
      logits = [[2.0, 3.0, -4.0], [0.3, 0.1, 0.4]]
      dist = roc.RelaxedOneHotCategorical(
          temperature, logits, validate_args=True
      )
      self.assertAllEqual(
          [2, 3],
          self.evaluate(dist.sample(seed=test_util.test_seed())).shape,
      )
      self.assertAllEqual(
          [5, 2, 3],
          self.evaluate(
              dist.sample(5, seed=test_util.test_seed())
          ).shape,
      )
      # multiple distributions
      logits = np.random.uniform(size=(4, 1, 3)).astype(np.float32)
      dist = roc.RelaxedOneHotCategorical(
          temperature, logits, validate_args=True
      )
      self.assertAllEqual(
          [4, 1, 3],
          self.evaluate(dist.sample(seed=test_util.test_seed())).shape,
      )
      self.assertAllEqual(
          [5, 4, 1, 3],
          self.evaluate(
              dist.sample(5, seed=test_util.test_seed())
          ).shape,
      )
  
imports: from absl.testing import parameterized
  import numpy
  from scipy.special import gamma
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.distributions import relaxed_onehot_categorical
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.util import deferred_tensor
label_desc: Use image node_id 5 for calling the RelaxedOneHotCategoricalTest obj's underlying member method code with example usage: obj.testSample() without return types