def get_course_with_access(user, action, course_key, depth=0, check_if_enrolled=False):
 course = get_course_by_id(course_key, depth)
 check_course_access(course, user, action, check_if_enrolled)
 return course

def get_course_with_access ( user , action , course_key , depth = 0 , check_if_enrolled = False ) : course = get_course_by_id ( course_key , depth ) check_course_access ( course , user , action , check_if_enrolled ) return course
given a course_key .