def _re_flatten(p):
if '<STR_LIT:(>' not in p:<EOL><INDENT>return p<EOL><DEDENT>return re.sub(r'<STR_LIT>', lambda m: m.group(<NUM_LIT:0>) if<EOL>len(m.group(<NUM_LIT:1>)) % <NUM_LIT:2> else m.group(<NUM_LIT:1>) + '<STR_LIT>', p)<EOL>
Turn all capturing groups in a regular expression pattern into
        non-capturing groups.