code: def test_conditioning(self, joint_distribution):
      model = joint_distribution(
          [tfd.Normal(1.0, 2.0), lambda a: tfd.Normal(2 * a + 1.0, 5.0)]
      )
  
      approx = rethinking.quap(
          model, data=[None, 2.0], initial_position=[1.5]
      )
  
      dists, _ = approx.sample_distributions()
      # See, e.g., Bishop, equation 2.116
      self.assertAllClose(dists[0].mean(), 33.0 / 41.0)
      self.assertAllClose(dists[0].stddev(), (100.0 / 41.0) ** 0.5)
  
file_path: probability/tensorflow_probability/examples/statistical_rethinking/rethinking/quap_test.py
imports: import collections
  from absl.testing import parameterized
  import tensorflow.compat.v2
  import tensorflow_probability
  from tensorflow_probability.examples.statistical_rethinking import rethinking
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 2 for calling the QuapTestJDSequential obj's underlying member method code with example usage: obj.test_conditioning(joint_distribution) without return types