code: def testUniformUniformKLInfinite(self):
      # This covers three cases:
      # - a.low < b.low,
      # - a.high > b.high, and
      # - both.
      a_low = np.array([-1.0, 0.0, -1.0])
      a_high = np.array([1.0, 2.0, 2.0])
      b_low = np.array([0.0] * 3)
      b_high = np.array([1.0] * 3)
      a = uniform.Uniform(low=a_low, high=a_high, validate_args=True)
      b = uniform.Uniform(low=b_low, high=b_high, validate_args=True)
  
      # Since 'a' can be sampled to give points outside the support of 'b',
      # the KL Divergence is infinite.
      true_kl = tf.convert_to_tensor(value=np.array([np.inf] * 3))
  
      kl = kullback_leibler.kl_divergence(a, b)
  
      true_kl_, kl_ = self.evaluate([true_kl, kl])
      self.assertAllEqual(true_kl_, kl_)
  
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 21 for calling the UniformTest obj's underlying member method code with example usage: obj.testUniformUniformKLInfinite() without return types