parameters: (worker_datasets, input_workers)
return_statement: return iterators
docstring: Create a multidevice iterator on each of the workers.
docstring_summary: Create a multidevice iterator on each of the workers.
docstring_tokens: Create a multidevice iterator on each of the workers .
function: def _create_iterators_per_worker(worker_datasets, input_workers):
    """Create a multidevice iterator on each of the workers."""
    assert isinstance(input_workers, InputWorkers)
  
    assert len(worker_datasets) == len(input_workers.worker_devices)
    iterators = []
    for i, worker in enumerate(input_workers.worker_devices):
      with ops.device(worker):
        worker_devices = input_workers.compute_devices_for_worker(i)
        iterator = _SingleWorkerDatasetIterator(worker_datasets[i], worker,
                                                worker_devices)
        iterators.append(iterator)
    return iterators
function_tokens: def _create_iterators_per_worker ( worker_datasets , input_workers ) : assert isinstance ( input_workers , InputWorkers ) assert len ( worker_datasets ) == len ( input_workers . worker_devices ) iterators = [ ] for i , worker in enumerate ( input_workers . worker_devices ) : with ops . device ( worker ) : worker_devices = input_workers . compute_devices_for_worker ( i ) iterator = _SingleWorkerDatasetIterator ( worker_datasets [ i ] , worker , worker_devices ) iterators . append ( iterator ) return iterators