code: def _invert_perm(perm):
      perm_inv = [0] * len(perm)
      for i, j in enumerate(perm):
          perm_inv[j] = i
      return tuple(perm_inv)
  
imports: import abc
  import functools
  from collections.abc import Iterable
  import numpy
  from absl import logging
  import jax
  import jax.numpy
  from jax import lax, random
label_desc: Use image node_id 8 for calling a global function with example usage: _invert_perm(perm) and returns: tuple