code: def __getattr__(self, name):
      if name == "_base_dataset":
          raise AttributeError()
  
      if hasattr(self._base_dataset, name) and not name.startswith("_"):
          # Raise error for backwards compatibility.
          # TODO: remove this method in 2.6.
          raise DeprecationWarning(
              "ray.train.get_dataset_shard returns a ray.data.DataIterator "
              "instead of a Dataset/DatasetPipeline as of Ray v2.3. "
              "Use iter_torch_batches(), to_tf(), or iter_batches() to "
              "iterate over one epoch. See "
              "https://docs.ray.io/en/latest/data/api/dataset_iterator.html "
              "for full DataIterator docs.",
          )
  
      raise AttributeError()
  
file_path: ray/python/ray/data/_internal/iterator/iterator_impl.py
imports: from typing import TYPE_CHECKING, Iterator, Optional, Tuple, Union
  from ray.data._internal.stats import DatasetStats
  from ray.data._internal.util import create_dataset_tag
  from ray.data.block import Block, BlockMetadata
  from ray.data.iterator import DataIterator
  from ray.types import ObjectRef
label_desc: Use image node_id 6 for calling the DataIteratorImpl obj's underlying member method code with example usage: obj.__getattr__(name) without return types