code: def test_fold_shape_of():
      c_shape = (8, 9, 10)
  
      def before(dtype):
          x = relay.var("x", shape=c_shape, dtype="float32")
          y = relay.var("y", shape=c_shape, dtype="float32")
          z = relay.shape_of(x + y, dtype)
          return relay.Function([x, y], z)
  
      def expected(dtype):
          x = relay.var("x", shape=c_shape, dtype="float32")
          y = relay.var("y", shape=c_shape, dtype="float32")
          z = relay.const(np.array(c_shape).astype(dtype), dtype=dtype)
          func = relay.Function([x, y], z)
          return func
  
      for dtype in ["int32", "float32"]:
          zz = run_opt_pass(before(dtype), transform.FoldConstant())
          zexpected = run_opt_pass(
              expected(dtype), transform.InferType()
          )
          tvm.ir.assert_structural_equal(zz, zexpected)
  
imports: import numpy
  import tvm
  import tvm.testing
  from tvm import relay
  from tvm.relay.backend import Executor
  from tvm.relay import transform
  from tvm.relay.build_module import bind_params_by_name
  from tvm.relay.testing import run_infer_type, create_workload
label_desc: Use image node_id 11 for calling a global function with example usage: test_fold_shape_of() and returns: relay, func