def get_course_updates(location, provided_id, user_id):
 try:
  course_updates = modulestore().get_item(location)
 except ItemNotFoundError:
  course_updates = modulestore().create_item(user_id, location.course_key, location.block_type, location.block_id)
 course_update_items = get_course_update_items(course_updates, _get_index(provided_id))
 return _get_visible_update(course_update_items)

def get_course_updates ( location , provided_id , user_id ) : try : course_updates = modulestore ( ) . get_item ( location ) except ItemNotFoundError : course_updates = modulestore ( ) . create_item ( user_id , location . course_key , location . block_type , location . block_id ) course_update_items = get_course_update_items ( course_updates , _get_index ( provided_id ) ) return _get_visible_update ( course_update_items )
retrieve the relevant course_info updates and unpack into the model which the client expects: [{id : index .