def METHOD_NAME(xml_output,Header_lines,version_string):
    for line in Header_lines:
        AmanziVersionName="Amanzi Input Format Version"
        if ( AmanziVersionName.lower() in line.lower() ):
            # case insensitive replacement
            line=re.sub("(?i)"+"amanzi input format version",AmanziVersionName,line,re.IGNORECASE)
            xml_output.write("%s\n" % ( line.replace(version_string,'1.2.3' ) ) )
        else:
            xml_output.write("%s\n" % ( line ) )
    return