You might want to consider using `evaluate_task_status`.