code: def assert_has_type(expr, typ, mod=None):
      if not mod:
          mod = tvm.IRModule({})
  
      mod["main"] = expr
      mod = infer_mod(mod)
      checked_expr = mod["main"]
      checked_type = checked_expr.checked_type
      if checked_type != typ:
          raise RuntimeError(
              "Type mismatch %s vs %s" % (checked_type, typ)
          )
  
imports: import pytest
  import tvm
  from tvm import IRModule, parser, relay, te
  from tvm.relay import analysis, op, transform
  from tvm.relay.op import op
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: assert_has_type(expr, typ, mod) without return types