def get_most_recent_version(post_edits_pair):
    """
    Sorts the dict values of the grouped post edits by creation date in descending order and return the most recent
    dict element i.e. version of the post.
    :param post_edits_pair: pair of post id, list of attribute dict elements
    :return: most recent dict element i.e. post version
    """
    (post_id, post_edits) = post_edits_pair
    post_edits = list(post_edits)
    post_edits.sort(key=lambda dict_elem: dict_elem['CreationDate'], reverse=True)
    return post_id, post_edits[0]