code: def test_read_write(
      tmp_path: pathlib.Path,
      builder_cls: Type[dataset_builder.DatasetBuilder],
      file_format: file_adapters.FileFormat,
  ):
      builder = builder_cls(data_dir=tmp_path, file_format=file_format)
      builder.download_and_prepare()
      ds = builder.as_dataset(split="train")
      assert list(ds.as_numpy_iterator()) == [
          {"id": i} for i in range(3)
      ]
  
file_path: datasets/tensorflow_datasets/core/file_adapters_test.py
imports: import pathlib
  from typing import Type
  import pytest
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import dataset_builder
  from tensorflow_datasets.core import file_adapters
label_desc: Use image node_id 4 for calling a global function with example usage: test_read_write(tmp_path, builder_cls, file_format) without return types