code: def testShapeAssertion(self):
      dist_type = tfp.distributions.MultivariateNormalDiag
      _, dist1_mean, dist1_cov = self._create_gaussian(dist_type)
      _, dist2_mean, dist2_cov = self._create_gaussian(dist_type)
      shape_error_regexp = "Shape (.*) must have rank [0-9]+"
      with self.assertRaisesRegexp(ValueError, shape_error_regexp):
          distribution_ops.factorised_kl_gaussian(
              dist1_mean,
              dist1_cov,
              dist2_mean,
              dist2_cov,
              both_diagonal=True,
          )
  
file_path: trfl/trfl/distribution_ops_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  from absl.testing import parameterized
  import tensorflow.compat.v1
  import tensorflow_probability
  from trfl import distribution_ops
label_desc: Use image node_id 3 for calling the FactorisedKLGaussianTest obj's underlying member method code with example usage: obj.testShapeAssertion() without return types