code: def index_sample(x, index):
      return x[ivy.arange(x.shape[0])[:, None], index]
  
file_path: ivy/ivy/functional/frontends/paddle/search.py
imports: import ivy
  from ivy.func_wrapper import with_supported_dtypes
  from ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back
label_desc: Use image node_id 4 for calling a global function with example usage: index_sample(x, index) and returns: x