def get_cohort_by_name(course_key, name):
 return CourseUserGroup.objects.get(course_id=course_key, group_type=CourseUserGroup.COHORT, name=name)

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