def get_ccx_by_ccx_id(course, coach, ccx_id):
 try:
  ccx = CustomCourseForEdX.objects.get(id=ccx_id, course_id=course.id, coach=coach)
 except CustomCourseForEdX.DoesNotExist:
  return None
 return ccx

def get_ccx_by_ccx_id ( course , coach , ccx_id ) : try : ccx = CustomCourseForEdX . objects . get ( id = ccx_id , course_id = course . id , coach = coach ) except CustomCourseForEdX . DoesNotExist : return None return ccx
finds a ccx of given coach on given master course .