@contextmanager
def ccx_course(ccx_locator):
 course = get_course_by_id(ccx_locator)
 (yield course)

@ contextmanager def ccx_course ( ccx_locator ) : course = get_course_by_id ( ccx_locator ) ( yield course )
create a context in which the course identified by course_locator exists .