code: def test_expand_dims():
      # based on topi test
      def verify_expand_dims(dshape, dtype, oshape, axis, num_newaxis):
          x = relay.Var("x", relay.TensorType(dshape, dtype))
          func = relay.Function(
              [x], relay.expand_dims(x, axis, num_newaxis)
          )
          for target, dev in tvm.testing.enabled_targets():
              if (
                  dtype == "float16"
                  and target == "cuda"
                  and not have_fp16(tvm.cuda(0).compute_version)
              ):
                  continue
              data = np.random.uniform(size=dshape).astype(dtype)
              ref_res = data.reshape(oshape)
              op_res = relay.create_executor(
                  "graph", device=dev, target=target
              ).evaluate(func)(data)
              np.testing.assert_allclose(
                  op_res.numpy(), ref_res, rtol=0.01
              )
  
      for dtype in ["float16", "float32"]:
          verify_expand_dims((3, 10), dtype, (3, 10, 1, 1), 2, 2)
          verify_expand_dims((3, 10), dtype, (1, 3, 10), -3, 1)
  
imports: import numpy
  import pytest
  import tvm
  from tvm import te
  import scipy
  from tvm import relay
  import pytest
  from tvm.relay.testing import run_infer_type
  import tvm.topi.testing
  from tvm.contrib.nvcc import have_fp16
  import tvm.testing
  from tvm.topi.utils import get_const_tuple
label_desc: Use image node_id 5 for calling a global function with example usage: test_expand_dims() without return types