def transpose_to_new_key(measures, key):
    """
    Translates all notes from their current key to the new key

    Args:
        measures (List[List[AnalyzedNotes]]): Song notes grouped by measure
        key (music21.key.Key): The key signature context.

    Returns:
        transposed_measures (List[List[AnalyzedNote]]): List of transposed notes grouped by their
                                                        corresponding measures.
    """
    transposed_measures = []
    for measure in measures:
        m = [note.in_new_key(key) for note in measure]

        transposed_measures.append(m)

    return transposed_measures