def METHOD_NAME(omit_version_comment):
    omit_version_comment_attr = (
        ",omitVersionComment"
        if omit_version_comment
        else ""
    )
    ir = textwrap.dedent(
        """
        module attributes {{circt.loweringOptions = "locationInfoStyle=none{omit_version_comment_attr}"}} {{
          hw.module @M() -> () {{}}
        }}
        """
    )
    ir = ir.format(
        omit_version_comment_attr=omit_version_comment_attr
    )
    _, ostream = _run_test(ir)
    ostream.seek(0)
    first = ostream.readline().strip()
    if omit_version_comment_attr:
        assert first == "module M();"
    else:
        assert first.startswith("// Generated by")