code: def block_generator(num_rows: int, num_blocks: int):
      for _ in range(num_blocks):
          yield pa.table({"foo": [1] * num_rows})
  
imports: import threading
  import time
  import numpy
  import pandas
  import pyarrow
  import pytest
  import ray
  from ray.data._internal.block_batching.interfaces import Batch
  from ray.data._internal.block_batching.util import _calculate_ref_hits, blocks_to_batches, collate, finalize_batches, format_batches, resolve_block_refs
  from ray.data._internal.util import Queue, make_async_gen
label_desc: Use image node_id 1 for calling a global function with example usage: block_generator(num_rows, num_blocks) without return types