class_docstr: Grain DataSource class.
  
  Warning: this is an experimental class. The interface might change in the
  future without backwards compatibility.
  
  It acts as a wrapper around `array_record.ArrayRecordDataSource` that can read
  from ArrayRecords. It exposes `__len__` and `__getitem__` to serve as a data
  source.
class_docstr_tok: ["Grain","DataSource","class",".","Warning",":","this","is","an","experimental","class",".","The","interface","might","change","in","the","future","without","backwards","compatibility",".","It","acts","as","a","wrapper","around","`","array_record.ArrayRecordDataSource","`","that","can","read","from","ArrayRecords",".","It","exposes","`","__len__","`","and","`","__getitem__","`","to","serve","as","a","data","source","."]
code: def __iter__(self):
      for i in range(self.length):
          yield self[i]
  
file_path: datasets/tensorflow_datasets/core/data_sources/array_record.py
imports: from collections.abc import Sequence
  import dataclasses
  from typing import Any, Optional, Sequence, TypeVar
  from absl import logging
  from tensorflow_datasets.core import dataset_info
  from tensorflow_datasets.core import decode
  from tensorflow_datasets.core import file_adapters
  from tensorflow_datasets.core import splits
  from tensorflow_datasets.core.utils import type_utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import array_record_data_source
  import tree
label_desc: Use image node_id 3 for calling the ArrayRecordDataSource obj's underlying member method code with example usage: obj.__iter__() without return types