code: def test_dyn_upsampling3d_run(executor_kind):
      def verify_upsampling3d(
          dshape,
          scale_d,
          scale_h,
          scale_w,
          layout,
          method,
          coord_trans="asymmetric",
      ):
          if layout == "NCDHW":
              (n, c, d, h, w) = dshape
              x_data = np.random.uniform(size=(n, c, d, h, w)).astype(
                  "float32"
              )
  
          elif layout == "NDHWC":
              (n, d, h, w, c) = dshape
              x_data = np.random.uniform(size=(n, d, h, w, c)).astype(
                  "float32"
              )
  
          ref_res = tvm.topi.testing.resize3d_python(
              x_data,
              (scale_d, scale_h, scale_w),
              layout,
              method[3:] if method[0:3] == "tri" else method,
              coord_trans,
          )
  
          x = relay.Var("x", relay.TensorType(dshape, "float32"))
          scale_d_var = relay.var(
              "scale_d", relay.TensorType((), "float32")
          )
          scale_h_var = relay.var(
              "scale_h", relay.TensorType((), "float32")
          )
          scale_w_var = relay.var(
              "scale_h", relay.TensorType((), "float32")
          )
  
          z = relay.nn.upsampling3d(
              x,
              scale_d_var,
              scale_h_var,
              scale_w_var,
              method=method,
              layout=layout,
              coordinate_transformation_mode=coord_trans,
          )
          zz = run_infer_type(z)
          func = relay.Function(
              [x, scale_d_var, scale_h_var, scale_w_var], z
          )
  
          for target, dev in enabled_targets():
              mod = tvm.ir.IRModule.from_expr(func)
              op_res = relay.create_executor(
                  executor_kind, mod=mod, device=dev, target=target
              ).evaluate()(
                  x_data,
                  np.array(scale_d).astype("float32"),
                  np.array(scale_h).astype("float32"),
                  np.array(scale_w).astype("float32"),
              )
              tvm.testing.assert_allclose(
                  op_res.numpy(), ref_res, rtol=1e-4, atol=1e-6
              )
  
      verify_upsampling3d(
          (1, 1, 1, 1, 1), 2, 3, 4, "NCDHW", "nearest_neighbor"
      )
      verify_upsampling3d(
          (1, 8, 16, 16, 16), 2.0, 3.0, 4.0, "NCDHW", "nearest_neighbor"
      )
      verify_upsampling3d(
          (1, 8, 16, 16, 16),
          2.0,
          5.0,
          1.0,
          "NCDHW",
          "trilinear",
          "align_corners",
      )
      verify_upsampling3d(
          (1, 20, 3, 4, 16), 2.0, 2.0, 2.0, "NDHWC", "nearest_neighbor"
      )
      verify_upsampling3d(
          (1, 8, 4, 16, 15),
          2.0,
          2.0,
          2.0,
          "NDHWC",
          "trilinear",
          "align_corners",
      )
  
file_path: tvm/tests/python/relay/dyn/test_dynamic_op_level2.py
imports: import numpy
  import tvm
  from tvm import relay
  from tvm import te
  from tvm.relay.testing import enabled_targets
  import random
  from test_dynamic_op_level3 import verify_func
  import tvm.topi.testing
  from tvm.relay.testing import run_infer_type
label_desc: Use image node_id 3 for calling a global function with example usage: test_dyn_upsampling3d_run(executor_kind) without return types