code: def testKlBlockwiseIsSum(self):
      gamma0 = gamma.Gamma(concentration=[1.0, 2.0, 3.0], rate=1.0)
      gamma1 = gamma.Gamma(concentration=[3.0, 4.0, 5.0], rate=1.0)
  
      normal0 = normal.Normal(loc=tf.zeros(3), scale=2.0)
      normal1 = normal.Normal(loc=tf.ones(3), scale=[2.0, 3.0, 4.0])
  
      d0 = blockwise.Blockwise(
          [
              independent.Independent(
                  gamma0, reinterpreted_batch_ndims=1
              ),
              independent.Independent(
                  normal0, reinterpreted_batch_ndims=1
              ),
          ],
          validate_args=True,
      )
  
      d1 = blockwise.Blockwise(
          [
              independent.Independent(
                  gamma1, reinterpreted_batch_ndims=1
              ),
              independent.Independent(
                  normal1, reinterpreted_batch_ndims=1
              ),
          ],
          validate_args=True,
      )
  
      kl_sum = tf.reduce_sum(
          (
              kullback_leibler.kl_divergence(gamma0, gamma1)
              + kullback_leibler.kl_divergence(normal0, normal1)
          )
      )
  
      blockwise_kl = kullback_leibler.kl_divergence(d0, d1)
  
      kl_sum_, blockwise_kl_ = self.evaluate([kl_sum, blockwise_kl])
  
      self.assertAllClose(kl_sum_, blockwise_kl_)
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import blockwise
  from tensorflow_probability.python.distributions import exponential
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import joint_distribution_coroutine
  from tensorflow_probability.python.distributions import joint_distribution_named
  from tensorflow_probability.python.distributions import joint_distribution_sequential
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import mvn_linear_operator
  from tensorflow_probability.python.distributions import mvn_tril
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 8 for calling the BlockwiseTest obj's underlying member method code with example usage: obj.testKlBlockwiseIsSum() without return types