code: def testVariableScaleAssertions(self):
      # We test that changing the scale to be non-invertible raises an exception
      # when validate_args is True. This is really just testing the underlying
      # ScaleMatvecLinearOperator instance, but we include it to demonstrate that
      # it works as expected.
      loc = tf.constant([1.0, 1.0])
      scale_tensor = tf.Variable(np.eye(2, dtype=np.float32))
      scale = tf.linalg.LinearOperatorLowerTriangular(
          scale_tensor, is_non_singular=True
      )
      d = mvn_linear_operator.MultivariateNormalLinearOperator(
          loc, scale, validate_args=True
      )
      self.evaluate(scale_tensor.initializer)
      with self.assertRaises(Exception):
          with tf.control_dependencies(
              [scale_tensor.assign([[1.0, 0.0], [1.0, 0.0]])]
          ):
              self.evaluate(d.sample(seed=test_util.test_seed()))
  
imports: import numpy
  from scipy import stats
  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 mvn_linear_operator
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 12 for calling the MultivariateNormalLinearOperatorTest obj's underlying member method code with example usage: obj.testVariableScaleAssertions() without return types