code: def __init__(self, paths: Union[str, List[str]], *, mode: str):
      super().__init__(
          paths,
          file_extensions=["png", "jpg", "jpeg", "bmp", "gif", "tiff"],
      )
  
      self.mode = mode
  
file_path: ray/doc/source/data/doc_code/custom_datasource_example.py
imports: from typing import Iterator, Union, List
  import pyarrow
  from ray.data.block import Block
  from ray.data.datasource import FileBasedDatasource
  import ray
  from typing import Any, Dict
  import pyarrow
  from ray.data.datasource import RowBasedFileDatasink
label_desc: Use image node_id 1 to create a new ImageDatasource object from inherited base classes: FileBasedDatasource with example: obj = ImageDatasource(paths)