code: def verify_adv_index(data_shape, index_shapes, indice_dtype="int64"):
      dtype = "float32"
      data = te.placeholder(shape=data_shape, name="data", dtype=dtype)
      indices = []
      np_data = np.random.uniform(size=data_shape).astype(dtype)
      np_indices = []
      for i, index_shape in enumerate(index_shapes):
          limit = data_shape[i]
          np_indices.append(
              np.random.uniform(0, limit - 1, size=index_shape).astype(
                  indice_dtype
              )
          )
          indices.append(
              te.placeholder(
                  shape=index_shape,
                  name="index_{}".format(i),
                  dtype=indice_dtype,
              )
          )
      np_out = np_data[tuple(np_indices)]
      out = topi.adv_index(data, indices)
  
      def check_device(target, dev):
          dev = tvm.device(target, 0)
          if not dev.exist:
              print("Skip because %s is not enabled" % target)
              return
          print("Running on target: %s" % target)
          with tvm.target.create(target):
              s = tvm.topi.testing.get_injective_schedule(target)(out)
  
          func = tvm.build(
              s, [data] + indices + [out], target, name="adv_index"
          )
  
          nd_list = [tvm.nd.array(np_data, dev)]
          for np_index in np_indices:
              nd_list.append(tvm.nd.array(np_index, dev))
          nd_list.append(
              tvm.nd.empty(out.shape, device=dev, dtype=data.dtype)
          )
  
          func(*nd_list)
          tvm.testing.assert_allclose(
              nd_list[-1].numpy(), np.array(np_out)
          )
  
      for target, dev in tvm.testing.enabled_targets():
          check_device(target, dev)
  
imports: import numpy
  import pytest
  import tvm
  from tvm import te
  from tvm import topi
  from tvm import relay
  import tvm.topi.testing
  from tvm.contrib.nvcc import have_fp16
  import tvm.testing
label_desc: Use image node_id 26 for calling a global function with example usage: verify_adv_index(data_shape, index_shapes, indice_dtype) without return types