code: def _check_indices(indices):
      if len(indices) == 0:
          return
      # TODO(unno): Check indices without cpu
      indices = cuda.to_cpu(indices)
      for i in indices:
          if 0 <= i < len(indices):
              continue
          raise ValueError("Out of bounds index: {}".format(i))
      sort = numpy.sort(indices)
      for s, t in six.moves.zip(sort, sort[1:]):
          if s == t:
              raise ValueError(
                  "indices contains duplicate value: {}".format(s)
              )
  
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 1 for calling a global function with example usage: _check_indices(indices) without return types