code: def testVersusMVNTriL(
      self,
      loc_shape,
      diag_shape,
      update_shape,
      include_diag_update,
      dtype,
  ):
      mvn_pair = self._mvn_pair(
          loc=self._construct_loc(loc_shape, dtype=dtype),
          cov_operator=self._construct_cov_operator(
              diag_shape,
              update_shape,
              include_diag_update=False,
              dtype=dtype,
          ),
      )
      tril = mvn_pair.tril
      low_rank_update = mvn_pair.low_rank_update
  
      with self.subTest("Shapes are equal"):
          self.assertAllEqual(
              tril.batch_shape, low_rank_update.batch_shape
          )
          self.assertAllEqual(
              tril.event_shape, low_rank_update.event_shape
          )
          self.assertAllEqual(
              *self.evaluate(
                  [
                      tril.batch_shape_tensor(),
                      low_rank_update.batch_shape_tensor(),
                  ]
              )
          )
          self.assertAllEqual(
              *self.evaluate(
                  [
                      tril.event_shape_tensor(),
                      low_rank_update.event_shape_tensor(),
                  ]
              )
          )
  
      with self.subTest("Statistics are almost equal"):
          self.assertAllClose(
              *self.evaluate([tril.mode(), low_rank_update.mode()])
          )
          self.assertAllClose(
              *self.evaluate([tril.mean(), low_rank_update.mean()])
          )
          self.assertAllClose(
              *self.evaluate([tril.stddev(), low_rank_update.stddev()])
          )
          self.assertAllClose(
              *self.evaluate(
                  [tril.covariance(), low_rank_update.covariance()]
              )
          )
          self.assertAllClose(
              *self.evaluate(
                  [tril.variance(), low_rank_update.variance()]
              )
          )
          self.assertAllClose(
              *self.evaluate(
                  [tril.entropy(), low_rank_update.entropy()]
              )
          )
  
      with self.subTest("Samples are correct"):
          n = 10000
          samples = low_rank_update.sample(
              n, seed=test_util.test_seed()
          )
          samples, sample_mean, sample_var, sample_cov = self.evaluate(
              [
                  samples,
                  tf.reduce_mean(samples, axis=0),
                  sample_stats.variance(samples, sample_axis=0),
                  sample_stats.covariance(samples, sample_axis=0),
              ]
          )
  
          ref_samples = tril.sample(n, seed=test_util.test_seed())
          self.assertAllEqual(ref_samples.shape, samples.shape)
  
          maxstddev = np.max(self.evaluate(low_rank_update.stddev()))
          self.assertAllMeansClose(
              samples,
              self.evaluate(low_rank_update.mean()),
              axis=0,
              atol=5 * maxstddev / np.sqrt(n),
          )
          self.assertAllClose(
              sample_var,
              self.evaluate(low_rank_update.variance()),
              rtol=5 * maxstddev / np.sqrt(n),
          )
          self.assertAllClose(
              sample_cov,
              self.evaluate(low_rank_update.covariance()),
              atol=10 * maxstddev**2 / np.sqrt(n),
          )
  
      with self.subTest("prob(mean) is almost equal"):
          x = sample_mean
          self.assertAllClose(
              *self.evaluate([tril.prob(x), low_rank_update.prob(x)]),
              rtol=1e-5,
          )
          self.assertAllClose(
              *self.evaluate(
                  [tril.log_prob(x), low_rank_update.log_prob(x)]
              ),
              rtol=1e-5,
          )
  
      with self.subTest("prob(widely dispersed) is almost equal"):
          x = self.evaluate(
              ref_samples * 5
          )  # Widely dispersed samples.
          self.assertAllClose(
              *self.evaluate(
                  [tril.log_prob(x), low_rank_update.log_prob(x)]
              ),
              rtol=1e-5,
          )
  
imports: import collections
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import mvn_low_rank_update_linear_operator_covariance
  from tensorflow_probability.python.distributions import mvn_tril
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.stats import sample_stats
label_desc: Use image node_id 4 for calling the MultivariateNormalLowRankUpdateLinearOperatorCovarianceTest obj's underlying member method code with example usage: obj.testVersusMVNTriL(loc_shape, diag_shape, update_shape, include_diag_update, dtype) without return types