code: def test_tir_debug_info():
      """
      Test that Spans are correctly replaced with debug spans that reference
      the printed TIR
      """
  
      def find_span(m):
          func = next(m.functions.values())
          return func.body.block.body.span
  
      module_before = _module()
      span_before = find_span(module_before)
      assert span_before is None
  
      module_after = tir.transform.InstallDebugSpans()(module_before)
      span_after = find_span(module_after)
  
      # Check that the module name has been added and a line number is present
      assert span_after.source_name.name == "main.tir"
      assert span_after.line == 4
  
file_path: tvm/tests/python/tir-base/test_debug_info.py
imports: import tvm
  import tvm.testing
  from tvm import tir
  from tvm import relay
  from tvm.script import tir
  from typing import List, Dict
  import re
label_desc: Use image node_id 3 for calling a global function with example usage: test_tir_debug_info() and returns: func