code: def test_recast_relu():
      """Recast a ReLU operator which does not have attributes."""
  
      def before():
          x = relay.var("x", shape=[8, 8, 8, 8])
          w = relay.var("w", shape=[8, 8, 3, 3])
          c = relay.nn.conv2d(x, w, padding=(1, 1), out_dtype="float32")
          r = relay.nn.relu(c)
          return relay.Function([x, w], r)
  
      def expected():
          x = relay.var("x", shape=[8, 8, 8, 8])
          w = relay.var("w", shape=[8, 8, 3, 3])
          x_fp16 = relay.cast(x, "float16")
          w_fp16 = relay.cast(w, "float16")
          c = relay.nn.conv2d(
              x_fp16, w_fp16, padding=(1, 1), out_dtype="float16"
          )
          c_float32 = relay.cast(c, "float32")
          c_float16 = relay.cast(c_float32, "float16")
          r = relay.nn.relu(c_float16)
          r_float32 = relay.cast(r, "float32")
          return relay.Function([x, w], r_float32)
  
      pre = before()
      post = recast(
          pre, "float16", "float16", ops=["nn.conv2d", "nn.relu"]
      )
      expected = expected()
      assert tvm.ir.structural_equal(expected, post)
  
file_path: tvm/tests/python/relay/test_recast.py
imports: import tvm
  from tvm import relay
  from tvm.relay.transform import recast
label_desc: Use image node_id 5 for calling a global function with example usage: test_recast_relu() and returns: relay, relay