def get_cohort_id(user, course_key, use_cached=False):
 cohort = get_cohort(user, course_key, use_cached=use_cached)
 return (None if (cohort is None) else cohort.id)

def get_cohort_id ( user , course_key , use_cached = False ) : cohort = get_cohort ( user , course_key , use_cached = use_cached ) return ( None if ( cohort is None ) else cohort . id )
given a course key and a user .