def get_countersigners(advice_to_countersign):
    """Get a set of user ids representing the users that have already
    countersigned the advice supplied by `advice_to_countersign`.
    """
    countersigned_by = set()
    for user_advice in advice_to_countersign.values():
        for advice in user_advice:
            if advice["countersigned_by"]:
                countersigned_by.add(advice["countersigned_by"]["id"])
    return countersigned_by