<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dashes_cleanup(records, prune_chars='.:?~'):
 """ Take an alignment and convert any undesirable characters such as ? or ~ to -. """

    logging.info(
        "Applying _dashes_cleanup: converting any of '{}' to '-'.".format(prune_chars))
    translation_table = {ord(c): '-' for c in prune_chars}
    for record in records:
        record.seq = Seq(str(record.seq).translate(translation_table),
                         record.seq.alphabet)
        yield record