code: def infer_mod(mod, annotate_spans=True):
      if annotate_spans:
          mod = relay.transform.AnnotateSpans()(mod)
  
      mod = transform.InferType()(mod)
      return mod
  
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 1 for calling a global function with example usage: infer_mod(mod, annotate_spans) and returns: mod