class_docstr: A `Dataset` that zips its inputs together.
docstr: See `Dataset.zip()` for details.
code: def __init__(self, datasets, name=None):
      """See `Dataset.zip()` for details."""
      for ds in nest.flatten(datasets):
          if not isinstance(ds, data_types.DatasetV2):
              if isinstance(ds, list):
                  raise TypeError(
                      "Invalid input to `zip`. Inputs are expected to be (nested)"
                      " structures of `tf.data.Dataset` objects. Python `list` is"
                      " not supported and you should use `tuple` instead."
                  )
              else:
                  raise TypeError(
                      "Invalid input to `zip`. Inputs are expected to be (nested)"
                      " structures of `tf.data.Dataset` objects but"
                      f" encountered object of type {type(ds)}."
                  )
      self._datasets = datasets
      self._structure = nest.pack_sequence_as(
          self._datasets,
          [ds.element_spec for ds in nest.flatten(self._datasets)],
      )
      self._name = name
      variant_tensor = gen_dataset_ops.zip_dataset(
          [ds._variant_tensor for ds in nest.flatten(self._datasets)],
          **self._common_args,
      )
      super().__init__(variant_tensor)
  
file_path: tensorflow/tensorflow/python/data/ops/zip_op.py
imports: from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.util import nest
  from tensorflow.python.ops import gen_dataset_ops
  from tensorflow.python.types import data
label_desc: Use image node_id 1 to create a new _ZipDataset object from inherited base classes: dataset_ops with example: obj = _ZipDataset(datasets, name)