code: def block_generator(
      num_rows: int, num_blocks: int
  ) -> Iterator[Tuple[Block, BlockMetadata]]:
      for i in range(num_blocks):
          yield pa.table({"foo": [i] * num_rows}), BlockMetadata(
              num_rows=num_rows,
              size_bytes=0,
              schema=None,
              input_files=[],
              exec_stats=None,
          )
  
file_path: ray/python/ray/data/tests/block_batching/test_iter_batches.py
imports: import itertools
  import queue
  import threading
  import time
  from typing import Iterator, List, Tuple
  import pandas
  import pyarrow
  import pytest
  import ray
  from ray.data._internal.block_batching.interfaces import Batch, BlockPrefetcher
  from ray.data._internal.block_batching.iter_batches import iter_batches, prefetch_batches_locally, restore_original_order
  from ray.data.block import Block, BlockMetadata
label_desc: Use image node_id 1 for calling a global function with example usage: block_generator(num_rows, num_blocks) without return types