code: def testSliceSequencePreservesOrigVarGradLinkage(self):
      mu = self._rng.rand(4, 3, 1)
      mu = tf.Variable(mu)
      chol, _ = self._random_chol(7, 4, 1, 2, 2)
      chol = tf.Variable(chol)
      self.evaluate([mu.initializer, chol.initializer])
      dist = mvn_tril.MultivariateNormalTriL(
          mu, chol, validate_args=True
      )
      for slicer in [
          make_slicer[:5],
          make_slicer[..., -1],
          make_slicer[:, 1::2],
      ]:
          with tf.GradientTape() as tape:
              dist = slicer(dist)
              lp = dist.log_prob([0, 0])
          dlpdmu, dlpdchol = tape.gradient(lp, [mu, chol])
          self.assertIsNotNone(dlpdmu)
          self.assertIsNotNone(dlpdchol)
          self.assertGreater(
              self.evaluate(tf.reduce_sum(tf.abs(dlpdmu))), 0
          )
          self.assertGreater(
              self.evaluate(tf.reduce_sum(tf.abs(dlpdchol))), 0
          )
  
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 6 for calling the MultivariateNormalTriLSlicingTest obj's underlying member method code with example usage: obj.testSliceSequencePreservesOrigVarGradLinkage() without return types