class_docstr: Represents worker-distributed datasets created from dataset function.
class_docstr_tok: ["Represents","worker-distributed","datasets","created","from","dataset","function","."]
docstr: Makes an iterable from datasets created by the given function.
  
  Args:
    dataset_fn: A function that returns a `Dataset`.
    coordinator: a `ClusterCoordinator` object, used to create dataset
      resources.
docstr_tok: ["Makes","an","iterable","from","datasets","created","by","the","given","function",".","Args",":","dataset_fn",":","A","function","that","returns","a","`","Dataset","`",".","coordinator",":","a","`","ClusterCoordinator","`","object",",","used","to","create","dataset","resources","."]
code: def __init__(self, dataset_fn, coordinator):
      """Makes an iterable from datasets created by the given function.
  
      Args:
        dataset_fn: A function that returns a `Dataset`.
        coordinator: a `ClusterCoordinator` object, used to create dataset
          resources.
      """
  
      def disallow_variable_creation(next_creator, **kwargs):
          raise ValueError(
              "Creating variables in `dataset_fn` is not allowed."
          )
  
      if isinstance(dataset_fn, def_function.Function):
          with variable_scope.variable_creator_scope(
              disallow_variable_creation
          ):
              dataset_fn = dataset_fn.get_concrete_function()
      elif not isinstance(dataset_fn, tf_function.ConcreteFunction):
          with variable_scope.variable_creator_scope(
              disallow_variable_creation
          ):
              dataset_fn = def_function.function(
                  dataset_fn
              ).get_concrete_function()
      self._dataset_fn = dataset_fn
      self._coordinator = coordinator
      self._element_spec = None
  
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 1 to create a new PerWorkerDatasetFromDatasetFunction object from inherited base classes: object with example: obj = PerWorkerDatasetFromDatasetFunction(dataset_fn, coordinator)