code: def testUniformPDF(self):
      a = tf.constant([-3.0] * 5 + [15.0])
      b = tf.constant([11.0] * 5 + [20.0])
      dist = uniform.Uniform(low=a, high=b, validate_args=False)
  
      a_v = -3.0
      b_v = 11.0
      x = np.array(
          [-10.5, 4.0, 0.0, 10.99, 11.3, 17.0], dtype=np.float32
      )
  
      def _expected_pdf():
          pdf = np.zeros_like(x) + 1.0 / (b_v - a_v)
          pdf[x > b_v] = 0.0
          pdf[x < a_v] = 0.0
          pdf[5] = 1.0 / (20.0 - 15.0)
          return pdf
  
      expected_pdf = _expected_pdf()
  
      pdf = dist.prob(x)
      self.assertAllClose(expected_pdf, self.evaluate(pdf))
  
      log_pdf = dist.log_prob(x)
      self.assertAllClose(np.log(expected_pdf), self.evaluate(log_pdf))
  
imports: import numpy
  from scipy import stats
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import kullback_leibler
  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 2 for calling the UniformTest obj's underlying member method code with example usage: obj.testUniformPDF() and returns: pdf