code: def testPdf(self):
      temperature = 0.4
      logits = [0.3, 0.1, 0.4]
      k = len(logits)
      p = np.exp(logits) / np.sum(np.exp(logits))
      dist = roc.ExpRelaxedOneHotCategorical(
          temperature, logits, validate_args=True
      )
      x = self.evaluate(dist.sample(seed=test_util.test_seed()))
      # analytical ExpConcrete density presented in Maddison et al. 2016
      prod_term = p * np.exp(-temperature * x)
      expected_pdf = (
          gamma(k)
          * np.power(temperature, k - 1)
          * np.prod(prod_term / np.sum(prod_term))
      )
      pdf = self.evaluate(dist.prob(x))
      self.assertAllClose(expected_pdf, pdf)
  
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 2 for calling the ExpRelaxedOneHotCategoricalTest obj's underlying member method code with example usage: obj.testPdf() without return types