code: def gather_nd(data, indices, batch_dims=0, index_rank=None):
      """Gather elements or slices from data and store them to a tensor whose shape is
      defined by indices.
  
      Parameters
      ----------
      data : relay.Expr
          The input data to the operator.
  
      indices : relay.Expr
          The shape of output tensor.
  
      batch_dims : int, optional
          The number of batch dimensions.
  
      index_rank : int, optional
          The size of an indexing tuple, which is a fixed value and the same as indices.shape[0].
          Only needed when other dimensions of indices are dynamic.
  
      Returns
      -------
      ret : relay.Expr
          The computed result.
  
      Examples
      --------
      .. code-block:: python
  
          data = [[0, 1], [2, 3]]
          indices = [[1, 1, 0], [0, 1, 0]]
          relay.gather_nd(data, indices) = [2, 3, 0]
  
          data = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
          indices = [[0, 1], [1, 0]]
          relay.gather_nd(data, indices) = [[3, 4], [5, 6]]
  
          data = [[[0, 1], [2, 3]], [[4, 5], [6, 7]]]
          indices = [[1, 0]]
          relay.gather_nd(data, indices, batch_dims=1) = [[2, 3],[4, 5]]
      """
      return _make.gather_nd(data, indices, batch_dims, index_rank)
  
imports: from ...tir import expr
  from ..expr import Constant, Expr, Tuple, TupleWrapper, const
  from .None import _make
  from .dyn import _make
  from .tensor import shape_of
label_desc: Use image node_id 34 for calling a global function with example usage: gather_nd(data, indices, batch_dims, index_rank) and returns: _make