code: def gather_nd(data, index):
      index_ = index.reshape(index.shape[0], -1)  # flatten inner dims
      index_ = (idx + (Ellipsis,) for idx in zip(*index_))
      result = np.vstack([data[idx] for idx in index_])
      result = result.reshape(
          *(index.shape[1:] + data.shape[index.shape[0] :])
      )
      return result
  
imports: import pytest
  import numpy
  import nnabla.functions
  from nbla_test_utils import list_context, function_tester
label_desc: Use image node_id 1 for calling a global function with example usage: gather_nd(data, index) and returns: result