code: def test_basic_dataset(ray_start_regular_shared):
      ds = ray.data.range(100)
      it = ds.iterator()
      for _ in range(2):
          result = []
          for batch in it.iter_batches():
              batch = batch["id"]
              result += batch.tolist()
          assert result == list(range(100))
  
file_path: ray/python/ray/data/tests/test_iterator.py
imports: from typing import Dict
  from unittest.mock import MagicMock, patch
  import numpy
  import pytest
  import tensorflow
  import torch
  import ray
label_desc: Use image node_id 2 for calling a global function with example usage: test_basic_dataset(ray_start_regular_shared) without return types