code: def test_depth_to_space(remote, dtype, target, executor_type):
      def _get_model(a_shape, block_size):
          np.random.seed(0)
          a = relay.var("a", shape=(a_shape), dtype=dtype)
          out = relay.nn.depth_to_space(a, block_size)
          inputs = {
              "a": tvm.nd.array(
                  np.random.uniform(-1, 1, a_shape).astype(dtype)
              )
          }
          params = {}
          return out, params, inputs
  
      def _verify(out, params, inputs):
          mod = IRModule.from_expr(out)
          outputs = _build_and_run_network(
              remote, mod, params, inputs, target, executor_type
          )
          out_rtol = 1e-2 if dtype == "float16" else 1e-5
          tvm.testing.assert_allclose(
              outputs[0].asnumpy(),
              outputs[1].asnumpy(),
              rtol=out_rtol,
              atol=out_rtol,
          )
  
          # Check to make sure these ops are offloaded to CLML instead of TVM.
          exp_codegen = [
              {
                  "attrs": {
                      "dtype": [[dtype]],
                      "shape": [[list(inputs["a"].shape)]],
                  },
                  "name": "",
                  "op": "input",
              },
              {
                  "attrs": {
                      "block_size": [[str(int(out.attrs.block_size))]],
                      "layout": [["NCHW"]],
                      "mode": [["DCR"]],
                      "dtype": [[dtype]],
                      "num_inputs": "1",
                      "num_outputs": "1",
                      "shape": [[list(outputs[0].shape)]],
                  },
                  "inputs": [[0, 0, 0]],
                  "name": "nn.depth_to_space",
                  "op": "kernel",
              },
          ]
          verify_codegen(remote, mod, params, exp_codegen, target)
  
      _verify(*(_get_model((1, 64, 8, 8), 4)))
      _verify(*(_get_model((1, 64, 8, 8), 8)))
      _verify(*(_get_model((1, 512, 8, 8), 8)))
  
imports: import tvm
  import numpy
  from tvm import relay
  from tvm.relay.op.contrib import clml
  from tvm.relay import testing
  from tvm.ir import IRModule
  from tvm.contrib import utils
  from test_clml.infrastructure import build_and_run, build_and_run_vm, verify_codegen
  import pytest
label_desc: Use image node_id 14 for calling a global function with example usage: test_depth_to_space(remote, dtype, target, executor_type) and returns: out,  params,  inputs