code: def testMVNConjugateLinearUpdatePreservesStructuredLinops(self):
      strm = test_util.test_seed_stream()
      num_outputs = 4
  
      prior_scale = tf.linalg.LinearOperatorScaledIdentity(
          num_outputs, 4.0
      )
      likelihood_scale = tf.linalg.LinearOperatorScaledIdentity(
          num_outputs, 0.2
      )
      linear_transformation = tf.linalg.LinearOperatorIdentity(
          num_outputs
      )
      observation = tf.random.normal([num_outputs], seed=strm())
      posterior_mean, posterior_prec = ncp.mvn_conjugate_linear_update(
          prior_scale=prior_scale,
          linear_transformation=linear_transformation,
          likelihood_scale=likelihood_scale,
          observation=observation,
      )
      self.assertIsInstance(
          posterior_prec, tf.linalg.LinearOperatorScaledIdentity
      )
  
      self._mvn_linear_update_test_helper(
          prior_mean=tf.zeros([num_outputs]),
          prior_scale=prior_scale.to_dense(),
          linear_transformation=linear_transformation.to_dense(),
          likelihood_scale=likelihood_scale.to_dense(),
          observation=observation,
          candidate_posterior_mean=posterior_mean,
          candidate_posterior_prec=posterior_prec.to_dense(),
      )
  
      # Also check the result against the scalar calculation.
      scalar_posterior_dist = (
          ncp.normal_conjugates_known_scale_posterior(
              prior=normal.Normal(
                  loc=0.0, scale=prior_scale.diag_part()
              ),
              scale=likelihood_scale.diag_part(),
              s=observation,
              n=1,
          )
      )
      (
          posterior_mean_,
          posterior_prec_,
          scalar_posterior_mean_,
          scalar_posterior_prec_,
      ) = self.evaluate(
          (
              posterior_mean,
              posterior_prec.to_dense(),
              scalar_posterior_dist.mean(),
              tf.linalg.diag(1.0 / scalar_posterior_dist.variance()),
          )
      )
      self.assertAllClose(posterior_mean_, scalar_posterior_mean_)
      self.assertAllClose(posterior_prec_, scalar_posterior_prec_)
  
file_path: probability/tensorflow_probability/python/distributions/normal_conjugate_posteriors_test.py
imports: import math
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import fill_scale_tril
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import normal_conjugate_posteriors
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 7 for calling the NormalTest obj's underlying member method code with example usage: obj.testMVNConjugateLinearUpdatePreservesStructuredLinops() without return types