code: def testLogProbAndGradGivesFiniteResults(self):
      def quantized_log_prob(dtype):
          x = np.arange(-100, 100, 2).astype(dtype)
  
          def inner_func(mu, sigma):
              qdist = qd.QuantizedDistribution(
                  distribution=normal.Normal(loc=mu, scale=sigma),
                  validate_args=True,
              )
              return qdist.log_prob(x)
  
          return inner_func
  
      for dtype in [np.float32, np.float64]:
          mu = tf.constant(0.0, dtype=dtype, name="mu")
          sigma = tf.constant(1.0, dtype=dtype, name="sigma")
          value, grads = self.evaluate(
              gradient.value_and_gradient(
                  quantized_log_prob(dtype), [mu, sigma]
              )
          )
          self.assertAllFinite(value)
          self.assertAllFinite(grads)
  
imports: import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import exponential
  from tensorflow_probability.python.distributions import logistic
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import quantized_distribution
  from tensorflow_probability.python.distributions import uniform
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 13 for calling the QuantizedDistributionTest obj's underlying member method code with example usage: obj.testLogProbAndGradGivesFiniteResults() and returns: inner_func, qdist