class_docstr: Represents worker-distributed datasets created from dataset function.
class_docstr_tok: ["Represents","worker-distributed","datasets","created","from","dataset","function","."]
docstr: Trigger dataset creation on workers without creating an iterator.
  
  Returns:
    A PerWorkerValues object containing a tuple of RemoteValues, themselves
    containing the built Dataset for each worker
docstr_tok: ["Trigger","dataset","creation","on","workers","without","creating","an","iterator",".","Returns",":","A","PerWorkerValues","object","containing","a","tuple","of","RemoteValues",",","themselves","containing","the","built","Dataset","for","each","worker"]
code: def build(self):
      """Trigger dataset creation on workers without creating an iterator.
  
      Returns:
        A PerWorkerValues object containing a tuple of RemoteValues, themselves
        containing the built Dataset for each worker
      """
  
      def _create_per_worker_dataset():
          dataset = self._dataset_fn()
          return dataset
  
      # pylint: disable=protected-access
      per_worker_dataset = (
          self._coordinator._create_per_worker_resources(
              _create_per_worker_dataset
          )
      )
      # hack type_spec of RemoteValues
      dataset_fn_output_type_spec = (
          self._dataset_fn.structured_outputs._type_spec
      )
      for dataset_remote_value in per_worker_dataset._values:
          dataset_remote_value._type_spec = dataset_fn_output_type_spec
      return per_worker_dataset
  
imports: import threading
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops.options import ExternalStatePolicy
  from tensorflow.python.distribute import input_lib
  from tensorflow.python.distribute.coordinator import remote_value
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import function
  from tensorflow.python.framework import composite_tensor
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import type_spec
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_dataset_ops
  from tensorflow.python.ops import gen_experimental_dataset_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.util import nest
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 2 for calling the PerWorkerDatasetFromDatasetFunction obj's underlying member method code with example usage: obj.build() and returns: per_worker_dataset, dataset