class_docstr: Hugging Face Dataset datasource, for reading from a
  `Hugging Face Datasets Dataset <https://huggingface.co/docs/datasets/package_reference/main_classes#datasets.Dataset/>`_.
  This Datasource implements a streamed read using a
  single read task, most beneficial for a
  `Hugging Face Datasets IterableDataset <https://huggingface.co/docs/datasets/package_reference/main_classes#datasets.IterableDataset/>`_
  or datasets which are too large to fit in-memory.
  For an in-memory Hugging Face Dataset (`datasets.Dataset`), use :meth:`~ray.data.from_huggingface`
  directly for faster performance.
code: def __init__(
      self,
      dataset: Union["datasets.Dataset", "datasets.IterableDataset"],
      batch_size: int = 4096,
  ):
      if TRANSFORMERS_IMPORT_ERROR is not None:
          raise TRANSFORMERS_IMPORT_ERROR
  
      self._dataset = dataset
      self._batch_size = batch_size
  
file_path: ray/python/ray/data/datasource/huggingface_datasource.py
imports: import sys
  from typing import TYPE_CHECKING, Iterable, List, Optional, Union
  from ray.data._internal.dataset_logger import DatasetLogger
  from ray.data._internal.util import _check_pyarrow_version
  from ray.data.block import Block, BlockAccessor, BlockMetadata
  from ray.data.datasource import Datasource, ReadTask
  from ray.util.annotations import DeveloperAPI
label_desc: Use image node_id 1 to create a new HuggingFaceDatasource object from inherited base classes: Datasource with example: obj = HuggingFaceDatasource(dataset, batch_size)