code: def testEntropyGradientNegInfLogits(self):
      def get_entropy_fn(logit):
          logits = [logit, tf.constant(-np.inf, dtype=tf.float32)]
          categorical_distribution = categorical.Categorical(
              logits=logits, validate_args=True
          )
          return categorical_distribution.entropy()
  
      logit = 0.0
  
      (
          categorical_entropy,
          categorical_entropy_g,
      ) = gradient.value_and_gradient(get_entropy_fn, logit)
      self.assertAllClose(categorical_entropy, 0.0)
      self.assertAllClose(categorical_entropy_g, 0.0)
  
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 19 for calling the CategoricalTest obj's underlying member method code with example usage: obj.testEntropyGradientNegInfLogits() and returns: categorical_distribution