def do_apply(mutation_pk, dict_synonyms, backup):
filename, mutation_id = filename_and_mutation_id_from_pk(int(mutation_pk))<EOL>update_line_numbers(filename)<EOL>context = Context(<EOL>mutation_id=mutation_id,<EOL>filename=filename,<EOL>dict_synonyms=dict_synonyms,<EOL>)<EOL>mutate_file(<EOL>backup=backup,<EOL>context=context,<EOL>)<EOL>if context.number_of_performed_mutations == <NUM_LIT:0>:<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>
Apply a specified mutant to the source code

    :param mutation_pk: mutmut cache primary key of the mutant to apply
    :type mutation_pk: str

    :param dict_synonyms: list of synonym keywords for a python dictionary
    :type dict_synonyms: list[str]

    :param backup: if :obj:`True` create a backup of the source file
        before applying the mutation
    :type backup: bool