code: def test_kahan_precision(self, jit=False):
      maybe_jit = lambda f: f
      if jit:
          self.skip_if_no_xla()
          maybe_jit = tf.function(jit_compile=True)
  
      n = 2_500
      stream = test_util.test_seed_stream()
      samps = normal.Normal(0, 1).sample(n, seed=stream())
  
      scale = lognormal.LogNormal(0, 0.2).sample([7, 1], seed=stream())
      mvn = mvn_tril.MultivariateNormalTriL(
          loc=tf.zeros([n]),
          scale_tril=tf.linalg.diag(tf.zeros([n]) + scale),
          experimental_use_kahan_sum=True,
      )
      mvn64 = mvn_tril.MultivariateNormalTriL(
          loc=tf.zeros([n], dtype=tf.float64),
          scale_tril=tf.linalg.diag(
              tf.zeros([n], dtype=tf.float64)
              + tf.cast(scale, tf.float64)
          ),
      )
      lp = maybe_jit(mvn.log_prob)(samps)
      lp64 = mvn64.log_prob(tf.cast(samps, tf.float64))
      lp, lp64 = self.evaluate((tf.cast(lp, tf.float64), lp64))
      # With fast-math off, without Kahan fails 15-100%, max-abs-error ~.006
      self.assertAllClose(lp64, lp, rtol=0, atol=0.0008)
  
imports: 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.bijectors import softplus
  from tensorflow_probability.python.bijectors import transform_diagonal
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import lognormal
  from tensorflow_probability.python.distributions import mvn_tril
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 23 for calling the MultivariateNormalTriLTest obj's underlying member method code with example usage: obj.test_kahan_precision(jit) without return types