class_docstr: An iterator for a tf.data.Dataset distributed using DTensor.
  
  DTensorIterator encapsulates multiple underlying dataset iterators. It handles
  retrieving the tensors to be placed on each underlying device and then uses
  the 'pack' operation to create and return a DTensor. Thus users need only
  interact with a single DTensorIterator to automatically distribute dataset
  tensors onto devices.
class_docstr_tok: ["An","iterator","for","a","tf.data.Dataset","distributed","using","DTensor",".","DTensorIterator","encapsulates","multiple","underlying","dataset","iterators",".","It","handles","retrieving","the","tensors","to","be","placed","on","each","underlying","device","and","then","uses","the","'pack","'","operation","to","create","and","return","a","DTensor",".","Thus","users","need","only","interact","with","a","single","DTensorIterator","to","automatically","distribute","dataset","tensors","onto","devices","."]
code: def _type_spec(self):
      return _DTensorIteratorSpec(
          self._global_element_spec, self._layouts_str
      )
  
imports: import dataclasses
  import operator
  from typing import Any, List, Optional, Sequence, Tuple
  from tensorflow.dtensor.python import api
  from tensorflow.dtensor.python import config
  from tensorflow.dtensor.python import layout
  from tensorflow.python.data.experimental.ops import data_service_ops
  from tensorflow.python.data.experimental.ops import distribute
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import iterator_ops
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.types import data
  from tensorflow.python.util import nest
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 3 for calling the _DTensorIterator obj's underlying member method code with example usage: obj._type_spec() and returns: _DTensorIteratorSpec