def get_case_group_status_by_collection_exercise(case_groups, collection_exercise_id):
    """
    Gets the response status of a case for a collection exercise

    :param case_groups: A list of case_groups
    :type case_groups: list
    :param collection_exercise_id: A collection exercise uuid
    :type collection_exercise_id: str
    :return: A string representing the status of the case
    :rtype: str
    """
    return next(
        case_group["caseGroupStatus"]
        for case_group in case_groups
        if case_group["collectionExerciseId"] == collection_exercise_id
    )