def update_func_body(original, updater=None):
updated = '<STR_LIT>'<EOL>regex = r'<STR_LIT>'<EOL>match = re.search(regex, original)<EOL>while match:<EOL><INDENT>name = match.group(<NUM_LIT:1>)<EOL>logging.debug(_('<STR_LIT>'), name)<EOL>start = match.end()<EOL>end = start + find_balance_index(original[start:])<EOL>body = original[start:end]<EOL>if updater:<EOL><INDENT>body = updater(body, name)<EOL><DEDENT>updated += original[:start] + '<STR_LIT:\n>' + body + original[end]<EOL>original = original[end + <NUM_LIT:1>:]<EOL>match = re.search(regex, original)<EOL><DEDENT>return updated<EOL>
Update all function body using the updating function.