code: def test_type_propagation():
      target = "test_type_propagation"
  
      @tvm.ir.register_op_attr("nn.relu", "target." + target)
      def relu(expr):  # pylint: disable=unused-variable
          return expr.args[0].checked_type.dtype == "float32"
  
      def before():
          x = relay.var("x", shape=(10, 10))
          r = relay.nn.relu(x)
          out = relay.nn.relu(r)
          f = relay.Function([x], out)
          mod = tvm.IRModule.from_expr(f)
          return mod
  
      for annotate_non_call_ops in [False, True]:
          # If the type isn't propogated, then the relu checker function will fail to get the dtype.
          assert transform.AnnotateTarget(
              target, annotate_non_call_ops
          )(before())
  
imports: import os
  import sys
  import numpy
  import pytest
  import tvm
  import tvm.relay.testing
  import tvm.relay.transform
  from tvm import relay
  from tvm import runtime
  from tvm.contrib import utils
label_desc: Use image node_id 5 for calling a global function with example usage: test_type_propagation() and returns: unknown, mod