class_docstr: A `Dataset` that divides its input batches into `num_replicas` sub-batches.
  
  For each batch in the input dataset, _LegacyRebatchDataset will produce
  `num_replicas` smaller batches whose sizes add up to the original batch size.
  
  For example:
  
  ```python
  ds = tf.data.Dataset.range(8)
  ds = ds.batch(4)
  ds = _LegacyRebatchDataset(ds, num_replicas=3)
  for elem in ds:
    print(elem)
  >> [0, 1], [2, 3], [], [4, 5], [6, 7], []
  ```
class_docstr_tok: ["A","`","Dataset","`","that","divides","its","input","batches","into","`","num_replicas","`","sub-batches",".","For","each","batch","in","the","input","dataset",",","_LegacyRebatchDataset","will","produce","`","num_replicas","`","smaller","batches","whose","sizes","add","up","to","the","original","batch","size",".","For","example",":","``","`","python","ds","=","tf.data.Dataset.range","(","8",")","ds","=","ds.batch","(","4",")","ds","=","_LegacyRebatchDataset","(","ds",",","num_replicas=3",")","for","elem","in","ds",":","print","(","elem",")",">",">","[","0",",","1","]",",","[","2",",","3","]",",","[","]",",","[","4",",","5","]",",","[","6",",","7","]",",","[","]","``","`"]
code: def element_spec(self):
      return self._element_spec
  
imports: from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops.options import ExternalStatePolicy
  from tensorflow.python.data.util import nest
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_experimental_dataset_ops
  from tensorflow.python.types import data
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 2 for calling the _LegacyRebatchDataset obj's underlying member method code with example usage: obj.element_spec() and returns: self