def METHOD_NAME(task):
    """Try to start a task. This only succeeds if the task hasn't already
    run, and no jobs are currently running that is excluded by the task."""
    if jobs[task].state != 'waiting':
        return
    if all(is_not_running(i) for i in jobs[task].exclude):
        jobs[task].state = 'running'
        key, job = jobs[task].key, jobs[task].job
        job_sink.send((key, job))