code: def testCategoricalCategoricalKL(self):
      def np_softmax(logits):
          exp_logits = np.exp(logits)
          return exp_logits / exp_logits.sum(axis=-1, keepdims=True)
  
      for categories in [2, 4]:
          for batch_size in [1, 10]:
              a_logits = np.random.randn(batch_size, categories)
              b_logits = np.random.randn(batch_size, categories)
  
              a = categorical.Categorical(
                  logits=a_logits, validate_args=True
              )
              b = categorical.Categorical(
                  logits=b_logits, validate_args=True
              )
  
              kl = kullback_leibler.kl_divergence(a, b)
              kl_val = self.evaluate(kl)
              # Make sure KL(a||a) is 0
              kl_same = self.evaluate(
                  kullback_leibler.kl_divergence(a, a)
              )
  
              prob_a = np_softmax(a_logits)
              prob_b = np_softmax(b_logits)
              kl_expected = np.sum(
                  prob_a * (np.log(prob_a) - np.log(prob_b)), axis=-1
              )
  
              self.assertEqual(kl.shape, (batch_size,))
              self.assertAllClose(kl_val, kl_expected)
              self.assertAllClose(kl_same, np.zeros_like(kl_expected))
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
  from tensorflow_probability.python.util import deferred_tensor
label_desc: Use image node_id 30 for calling the CategoricalTest obj's underlying member method code with example usage: obj.testCategoricalCategoricalKL() and returns: unknown