code: def test_block_ref_bundler_uniform(
      target, n, num_bundles, num_out_bundles, out_bundle_size
  ):
      # Test that the bundler creates the expected number of bundles with the expected
      # size.
      bundler = _BlockRefBundler(target)
      data = np.arange(n)
      pre_bundles = [
          arr.tolist() for arr in np.array_split(data, num_bundles)
      ]
      bundles = make_ref_bundles(pre_bundles)
      out_bundles = []
      for bundle in bundles:
          bundler.add_bundle(bundle)
          while bundler.has_bundle():
              out_bundles.append(bundler.get_next_bundle())
      bundler.done_adding_bundles()
      if bundler.has_bundle():
          out_bundles.append(bundler.get_next_bundle())
      assert len(out_bundles) == num_out_bundles
      for out_bundle in out_bundles:
          assert out_bundle.num_rows() == out_bundle_size
      flat_out = [
          i
          for bundle in out_bundles
          for block, _ in bundle.blocks
          for i in list(ray.get(block)["id"])
      ]
      assert flat_out == list(range(n))
  
imports: import collections
  import random
  import time
  from typing import Any, Iterable, List
  from unittest.mock import MagicMock
  import numpy
  import pandas
  import pytest
  import ray
  from ray._private.test_utils import wait_for_condition
  from ray.data._internal.compute import ActorPoolStrategy, TaskPoolStrategy
  from ray.data._internal.execution.interfaces import ExecutionOptions, PhysicalOperator, RefBundle
  from ray.data._internal.execution.operators.actor_pool_map_operator import ActorPoolMapOperator
  from ray.data._internal.execution.operators.base_physical_operator import AllToAllOperator
  from ray.data._internal.execution.operators.input_data_buffer import InputDataBuffer
  from ray.data._internal.execution.operators.limit_operator import LimitOperator
  from ray.data._internal.execution.operators.map_operator import MapOperator, _BlockRefBundler
  from ray.data._internal.execution.operators.map_transformer import create_map_transformer_from_block_fn
  from ray.data._internal.execution.operators.output_splitter import OutputSplitter
  from ray.data._internal.execution.operators.task_pool_map_operator import TaskPoolMapOperator
  from ray.data._internal.execution.operators.union_operator import UnionOperator
  from ray.data._internal.execution.util import make_ref_bundles
  from ray.data.block import Block
  from ray.data.context import DataContext
  from ray.data.tests.util import run_one_op_task, run_op_tasks_sync
  from ray.tests.conftest import *
label_desc: Use image node_id 24 for calling a global function with example usage: test_block_ref_bundler_uniform(target, n, num_bundles, num_out_bundles, out_bundle_size) without return types