code: def verify_unravel_index(indices, shape, dtype, indice_dtype="int64"):
      x_data = np.array(indices).astype(indice_dtype)
      y_data = np.array(shape).astype(dtype)
      if len(x_data.shape) == 1:
          dst_shape = [y_data.shape[0], x_data.shape[0]]
      else:
          dst_shape = [y_data.shape[0]]
  
      X = te.placeholder(
          shape=x_data.shape, dtype=indice_dtype, name="X"
      )
      Y = te.placeholder(shape=y_data.shape, dtype=dtype, name="Y")
      Z = topi.unravel_index(X, Y)
  
      def check_device(target, dev):
          print("Running on target: %s" % target)
          with tvm.target.Target(target):
              s = tvm.topi.testing.get_injective_schedule(target)(Z)
          foo = tvm.build(s, [X, Y, Z], target, name="unravel_index")
  
          out_npy = np.unravel_index(x_data, y_data)
          datax_nd = tvm.nd.array(x_data, dev)
          datay_nd = tvm.nd.array(y_data, dev)
          out_nd = tvm.nd.empty(dst_shape, device=dev, dtype=Z.dtype)
          foo(datax_nd, datay_nd, out_nd)
          tvm.testing.assert_allclose(out_nd.numpy(), out_npy)
  
      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 23 for calling a global function with example usage: verify_unravel_index(indices, shape, dtype, indice_dtype) without return types