We choose the worker that has the data on which *ts* depends. If several workers have dependencies then we choose the less-busy worker. Optionally provide *valid_workers* of where jobs are allowed to occur (if all workers are allowed to take the task, pass True instead). If the task requires data communication because no eligible worker has all the dependencies already, then we choose to minimize the number of bytes sent between workers. This is determined by calling the *objective* function.