code: def testBetaBetaKL(self):
      for shape in [(10,), (4, 5)]:
          a1 = 6.0 * np.random.random(size=shape) + 1e-4
          b1 = 6.0 * np.random.random(size=shape) + 1e-4
          a2 = 6.0 * np.random.random(size=shape) + 1e-4
          b2 = 6.0 * np.random.random(size=shape) + 1e-4
  
          d1 = beta.Beta(
              concentration1=a1, concentration0=b1, validate_args=True
          )
          d2 = beta.Beta(
              concentration1=a2, concentration0=b2, validate_args=True
          )
  
          kl_expected = (
              sp_special.betaln(a2, b2)
              - sp_special.betaln(a1, b1)
              + (a1 - a2) * sp_special.digamma(a1)
              + (b1 - b2) * sp_special.digamma(b1)
              + (a2 - a1 + b2 - b1) * sp_special.digamma(a1 + b1)
          )
  
          kl = kullback_leibler.kl_divergence(d1, d2)
          kl_val = self.evaluate(kl)
          self.assertEqual(kl.shape, shape)
          self.assertAllClose(kl_val, kl_expected)
  
          # Make sure KL(d1||d1) is 0
          kl_same = self.evaluate(
              kullback_leibler.kl_divergence(d1, d1)
          )
          self.assertAllClose(kl_same, np.zeros_like(kl_expected))
  
imports: from absl.testing import parameterized
  import numpy
  from scipy import special
  from scipy import stats
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import beta
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 29 for calling the BetaTest obj's underlying member method code with example usage: obj.testBetaBetaKL() without return types