code: def _inverse_indices(indices):
      xp = backend.get_array_module(indices)
      r = xp.empty_like(indices)
      if xp is numpy:
          r[indices] = numpy.arange(len(indices))
      else:
          cuda.elementwise(
              "S ind", "raw S r", "r[ind] = i", "inverse_indices"
          )(indices, r)
      return r
  
file_path: chainer/chainer/functions/array/permutate.py
imports: import numpy
  import six
  import chainer
  from chainer import backend
  from chainer.backends import cuda
  from chainer import function_node
  from chainer.utils import type_check
label_desc: Use image node_id 2 for calling a global function with example usage: _inverse_indices(indices) and returns: r