code: def _create_iterators_per_worker(
      worker_datasets, input_workers, options=None
  ):
      """Create a multidevice iterator on each of the workers."""
      assert isinstance(input_workers, input_lib.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
                  ],  # pylint: disable=protected-access
                  worker,
                  worker_devices,
                  options,
              )
              iterators.append(iterator)
      return iterators
  
imports: from tensorflow.python.data.experimental.ops import cardinality
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import multi_device_iterator_ops
  from tensorflow.python.data.ops import optional_ops
  from tensorflow.python.distribute import input_lib
  from tensorflow.python.eager import context
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.types import data
  from tensorflow.python.util.deprecation import deprecated
label_desc: Use image node_id 1 for calling a global function with example usage: _create_iterators_per_worker(worker_datasets, input_workers, options) and returns: iterators