code: def verify_strided_set(in_shape, v_shape, begin, end, strides=None):
      A = te.placeholder(shape=in_shape, name="A")
      V = te.placeholder(shape=v_shape, name="V")
      b = te.placeholder(shape=(len(begin),), name="b", dtype="int32")
      e = te.placeholder(shape=(len(end),), name="e", dtype="int32")
      if strides is not None:
          st = te.placeholder(
              shape=(len(strides),), name="st", dtype="int32"
          )
          B = topi.strided_set(A, V, b, e, st) + 1
      else:
          B = topi.strided_set(A, V, b, e) + 1
  
      def check_device(target):
          dev = tvm.device(target, 0)
          if not tvm.testing.device_enabled(target):
              print("Skip because %s is not enabled" % target)
              return
          print("Running on target: %s" % target)
          with tvm.target.Target(target):
              s = tvm.topi.testing.get_injective_schedule(target)(B)
  
          if strides is not None:
              foo = tvm.build(
                  s, [A, V, b, e, st, B], target, name="stride_set"
              )
              s_np = np.asarray(strides).astype("int32")
              s_nd = tvm.nd.array(s_np, dev)
          else:
              foo = tvm.build(
                  s, [A, V, b, e, B], target, name="stride_set"
              )
          x_np = np.random.uniform(size=in_shape).astype(A.dtype)
          v_np = np.random.uniform(size=v_shape).astype(V.dtype)
          b_np = np.asarray(begin).astype("int32")
          e_np = np.asarray(end).astype("int32")
          out_npy = (
              tvm.topi.testing.strided_set_python(
                  x_np, v_np, begin, end, strides
              )
              + 1
          )
          data_nd = tvm.nd.array(x_np, dev)
          v_nd = tvm.nd.array(v_np, dev)
          b_nd = tvm.nd.array(b_np, dev)
          e_nd = tvm.nd.array(e_np, dev)
          out_nd = tvm.nd.empty(
              out_npy.shape, device=dev, dtype=A.dtype
          )
          if strides is not None:
              foo(data_nd, v_nd, b_nd, e_nd, s_nd, out_nd)
          else:
              foo(data_nd, v_nd, b_nd, e_nd, out_nd)
          tvm.testing.assert_allclose(out_nd.numpy(), out_npy)
  
      for target in ["llvm", "opencl", "sdaccel", "aocl_sw_emu"]:
          check_device(target)
  
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 15 for calling a global function with example usage: verify_strided_set(in_shape, v_shape, begin, end, strides) without return types