def METHOD_NAME(self, _svc, course, group_set_id):
    try:
        # If not grading return all the groups in the course so the teacher can toggle between them.
        all_course_groups = self._canvas_api.group_category_groups(
            self._custom_course_id(course), group_set_id
        )
    except CanvasAPIError as canvas_api_error:
        raise GroupError(
            ErrorCodes.GROUP_SET_NOT_FOUND, group_set=group_set_id
        ) from canvas_api_error
    if not all_course_groups:
        raise GroupError(ErrorCodes.GROUP_SET_EMPTY, group_set=group_set_id)
    return all_course_groups