code: def testKLMultivariateToMultivariate(self):
      # (1, 1, 2) batch of MVNDiag
      mvn1 = mvn_diag.MultivariateNormalDiag(
          loc=np.float32([[[[-1.0, 1, 3.0], [2.0, 4.0, 3.0]]]]),
          scale_diag=np.float32([[[0.2, 0.1, 5.0], [2.0, 3.0, 4.0]]]),
      )
      ind1 = independent.Independent(
          distribution=mvn1,
          reinterpreted_batch_ndims=2,
          validate_args=True,
      )
  
      # (1, 1, 2) batch of MVNDiag
      mvn2 = mvn_diag.MultivariateNormalDiag(
          loc=np.float32([[[[-2.0, 3, 2.0], [1.0, 3.0, 2.0]]]]),
          scale_diag=np.float32([[[0.1, 0.5, 3.0], [1.0, 2.0, 1.0]]]),
      )
  
      ind2 = independent.Independent(
          distribution=mvn2,
          reinterpreted_batch_ndims=2,
          validate_args=True,
      )
  
      mvn_kl = kullback_leibler.kl_divergence(mvn1, mvn2)
      ind_kl = kullback_leibler.kl_divergence(ind1, ind2)
      self.assertAllClose(
          self.evaluate(tf.reduce_sum(mvn_kl, axis=[-1, -2])),
          self.evaluate(ind_kl),
      )
  
imports: import functools
  import os
  from absl.testing import parameterized
  import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import bernoulli
  from tensorflow_probability.python.distributions import exponential
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import log_prob_ratio
  from tensorflow_probability.python.distributions import logistic
  from tensorflow_probability.python.distributions import lognormal
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import poisson
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 11 for calling the IndependentDistributionTest obj's underlying member method code with example usage: obj.testKLMultivariateToMultivariate() without return types