class_docstr: Tests correctness of the `Transpose` bijector.
class_docstr_tok: ["Tests","correctness","of","the","`","Transpose","`","bijector","."]
code: def testModifiedVariableNonPermutationAssertion(self):
      message = "`perm` must be a valid permutation vector"
      permutation = tf.Variable(np.int32([1, 0, 2]))
      self.evaluate(permutation.initializer)
      bijector = transpose.Transpose(
          perm=permutation, validate_args=True
      )
      with self.assertRaisesRegexp(Exception, message):
          with tf.control_dependencies([permutation.assign([1, 0, 1])]):
              x = np.random.randn(4, 2, 3)
              _ = self.evaluate(bijector.forward(x))
  
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import invert
  from tensorflow_probability.python.bijectors import transpose
  from tensorflow_probability.python.distributions import independent
  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 11 for calling the _TransposeBijectorTest obj's underlying member method code with example usage: obj.testModifiedVariableNonPermutationAssertion() without return types