def get_cohort_by_id(course_key, cohort_id):
 return CourseUserGroup.objects.get(course_id=course_key, group_type=CourseUserGroup.COHORT, id=cohort_id)

def get_cohort_by_id ( course_key , cohort_id ) : return CourseUserGroup . objects . get ( course_id = course_key , group_type = CourseUserGroup . COHORT , id = cohort_id )
return the courseusergroup object for the given cohort .