code: def testAssertsVariableScaleTrilAfterMutation(self):
      df = 3
      scale_tril = tf.Variable(
          chol(make_pd(2.0, 2)), shape=[None, 2], validate_shape=False
      )
      self.evaluate(scale_tril.initializer)
      d = wishart.WishartTriL(
          df=df, scale_tril=scale_tril, validate_args=True
      )
      with self.assertRaisesOpError(
          "`scale_tril` must be positive definite."
      ):
          non_pd_scale = [[-2.0, 0.0], [1.0, 3.0]]
          with tf.control_dependencies(
              [scale_tril.assign(non_pd_scale)]
          ):
              self.evaluate(d.sample(seed=test_util.test_seed()))
  
      with self.assertRaisesOpError("`scale_tril` must be square."):
          non_square_scale = [[1.0, 0], [-2.0, 1.0], [1.0, 1.0]]
          with tf.control_dependencies(
              [scale_tril.assign(non_square_scale)]
          ):
              self.evaluate(d.event_shape_tensor())
  
imports: import numpy
  from scipy import linalg
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.distributions import mixture_same_family
  from tensorflow_probability.python.distributions import wishart
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 29 for calling the WishartTest obj's underlying member method code with example usage: obj.testAssertsVariableScaleTrilAfterMutation() without return types