def generate_swaptable(codon_to_aa, aa_to_codon_extended):
    """Generate a codon to extended codon dictionary"""
    codon_to_codon_extended = dict()
    for k, v in codon_to_aa.items():
        codon_to_codon_extended[k] = tuple(aa_to_codon_extended[v])
    return codon_to_codon_extended
