def _get_instructor_task_status(task_id):
 instructor_task = get_updated_instructor_task(task_id)
 status = get_status_from_instructor_task(instructor_task)
 if ((instructor_task is not None) and (instructor_task.task_state in STATES_WITH_STATUS)):
  (succeeded, message) = get_task_completion_info(instructor_task)
  status['message'] = message
  status['succeeded'] = succeeded
 return status

def _get_instructor_task_status ( task_id ) : instructor_task = get_updated_instructor_task ( task_id ) status = get_status_from_instructor_task ( instructor_task ) if ( ( instructor_task is not None ) and ( instructor_task . task_state in STATES_WITH_STATUS ) ) : ( succeeded , message ) = get_task_completion_info ( instructor_task ) status [ 'message' ] = message status [ 'succeeded' ] = succeeded return status
returns status for a specific task .