class_docstr: Adapter that handles `tf.data.Dataset`.
code: def get_size(self):
      size = cardinality.cardinality(self._dataset)
      if size == cardinality.INFINITE and self._user_steps is None:
          raise ValueError(
              "When passing an infinitely repeating tf.data.Dataset, you "
              "must specify how many steps to draw."
          )
      elif size == cardinality.INFINITE:
          return self._user_steps
      elif size >= 0:
          return size.numpy().item()
  
file_path: elegy/elegy/data/tf_dataset_adapter.py
imports: from tensorflow.python.data.experimental.ops import cardinality
  from tensorflow.python.data.ops import dataset_ops
  from .data_adapter import DataAdapter
  from .utils import flatten, is_none_or_empty, map_structure
label_desc: Use image node_id 4 for calling the TFDatasetAdapter obj's underlying member method code with example usage: obj.get_size() and returns: self, size