code: def testCorrectOutput(self):
      # Tests that the _batch_invert_permutation function correctly inverts a
      # batch of permutations.
      batch_size = 5
      length = 7
  
      permutations = np.empty([batch_size, length], dtype=int)
      for i in range(batch_size):
          permutations[i] = np.random.permutation(length)
  
      inverse = util.batch_invert_permutation(
          tf.constant(permutations, tf.int32)
      )
  
      inverse_np = inverse.numpy()
      for i in range(batch_size):
          for j in range(length):
              self.assertEqual(permutations[i][inverse_np[i][j]], j)
  
imports: from absl.testing import parameterized
  import numpy
  from sonnet.src import linear
  from sonnet.src import test_utils
  from sonnet.src.nets.dnc import util
  import tensorflow
  import tree
label_desc: Use image node_id 1 for calling the BatchInvertPermutationTest obj's underlying member method code with example usage: obj.testCorrectOutput() without return types