code: def test_map_batches_block_bundling_skewed_auto(
      ray_start_regular_shared, block_sizes, batch_size
  ):
      num_blocks = len(block_sizes)
      ds = ray.data.from_pandas(
          [
              pd.DataFrame({"a": [1] * block_size})
              for block_size in block_sizes
          ]
      )
      # Confirm that we have the expected number of initial blocks.
      assert ds.num_blocks() == num_blocks
      ds = ds.map_batches(
          lambda x: x, batch_size=batch_size
      ).materialize()
      curr = 0
      num_out_blocks = 0
      for block_size in block_sizes:
          if curr > 0 and curr + block_size > batch_size:
              num_out_blocks += 1
              curr = 0
          curr += block_size
      if curr > 0:
          num_out_blocks += 1
  
      # Blocks should be bundled up to the batch size.
      assert ds.num_blocks() == num_out_blocks
  
imports: import itertools
  import math
  import os
  import signal
  import threading
  import time
  from typing import Iterator
  import numpy
  import pandas
  import pyarrow
  import pyarrow.parquet
  import pytest
  import ray
  from ray._private.test_utils import wait_for_condition
  from ray.data.block import BlockAccessor
  from ray.data.context import DataContext
  from ray.data.tests.conftest import *
  from ray.data.tests.util import column_udf, column_udf_class, extract_values
  from ray.tests.conftest import *
label_desc: Use image node_id 18 for calling a global function with example usage: test_map_batches_block_bundling_skewed_auto(ray_start_regular_shared, block_sizes, batch_size) without return types