def METHOD_NAME():
    """
    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