def escape_ampersand(string):
if not string:<EOL><INDENT>return string<EOL><DEDENT>start_with_match = r"<STR_LIT>"<EOL>string = re.sub(r"<STR_LIT>" + start_with_match + "<STR_LIT:)>", '<STR_LIT>', string)<EOL>return string<EOL>
Quick convert unicode ampersand characters not associated with
a numbered entity or not starting with allowed characters to a plain &amp;