code: def testAssertsVariableScaleAfterMutation(self):
      df = tf.Variable(3.0)
      scale_tril = tf.Variable(
          chol(make_pd(2.0, 2.0)),
          dtype=np.float32,
          shape=tf.TensorShape(None),
      )
      self.evaluate([df.initializer, scale_tril.initializer])
      d = wishart.WishartTriL(
          df=df, scale_tril=scale_tril, validate_args=True
      )
      msg = "cannot be less than dimension of scale matrix"
      with self.assertRaisesOpError(msg):
          with tf.control_dependencies([df.assign(-2.0)]):
              self.evaluate(d.sample(seed=test_util.test_seed()))
  
      invalid_scale_tril = chol(make_pd(2.0, 4.0)).astype(np.float32)
      with self.assertRaisesOpError(msg):
          with tf.control_dependencies(
              [scale_tril.assign(invalid_scale_tril)]
          ):
              self.evaluate(d.mean())
  
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 27 for calling the WishartTest obj's underlying member method code with example usage: obj.testAssertsVariableScaleAfterMutation() without return types