def mutate(context):
try:<EOL><INDENT>result = parse(context.source, error_recovery=False)<EOL><DEDENT>except Exception:<EOL><INDENT>print('<STR_LIT>' % context.filename)<EOL>print('<STR_LIT>')<EOL>raise<EOL><DEDENT>mutate_list_of_nodes(result, context=context)<EOL>mutated_source = result.get_code().replace('<STR_LIT>', '<STR_LIT:U+0020>')<EOL>if context.remove_newline_at_end:<EOL><INDENT>assert mutated_source[-<NUM_LIT:1>] == '<STR_LIT:\n>'<EOL>mutated_source = mutated_source[:-<NUM_LIT:1>]<EOL><DEDENT>if context.number_of_performed_mutations:<EOL><INDENT>assert context.source != mutated_source<EOL><DEDENT>context.mutated_source = mutated_source<EOL>return mutated_source, context.number_of_performed_mutations<EOL>
:type context: Context
:return: tuple: mutated source code, number of mutations performed
:rtype: tuple[str, int]