def METHOD_NAME(key):
    """Finish a job. This function is called when we recieve a result."""
    task = key_task[key]
    jobs[task].state = 'done'
    for i in jobs[task].exclude:
        try_to_start(i)