code: def test_dynamic_block_split_deterministic(
      ray_start_regular_shared, target_max_block_size
  ):
      # Tests the determinism of block splitting.
      TEST_ITERATIONS = 10
      ctx = ray.data.DataContext.get_current()
      ctx.target_max_block_size = target_max_block_size
  
      # ~800 bytes per block
      ds = ray.data.range(1000, parallelism=10).map_batches(lambda x: x)
      data = [
          ray.get(block)
          for block in ds.materialize()._plan._in_blocks._blocks
      ]
      # Maps: first item of block -> block
      block_map = {block["id"][0]: block for block in data}
      # Iterate over multiple executions of the dataset,
      # and check that blocks were split in the same way
      for _ in range(TEST_ITERATIONS):
          data = [
              ray.get(block)
              for block in ds.materialize()._plan._in_blocks._blocks
          ]
          for block in data:
              assert block_map[block["id"][0]] == block
  
imports: import os
  import time
  from dataclasses import astuple, dataclass
  import numpy
  import pandas
  import pyarrow
  import pytest
  import ray
  from ray.data import Dataset
  from ray.data._internal.arrow_block import ArrowBlockAccessor
  from ray.data._internal.lazy_block_list import LazyBlockList
  from ray.data.block import BlockMetadata
  from ray.data.datasource import Datasource
  from ray.data.datasource.csv_datasource import CSVDatasource
  from ray.data.datasource.datasource import Reader, ReadTask
  from ray.data.tests.conftest import CoreExecutionMetrics, assert_blocks_expected_in_plasma, assert_core_execution_metrics_equals, get_initial_core_execution_metrics_snapshot
  from ray.tests.conftest import *
label_desc: Use image node_id 14 for calling a global function with example usage: test_dynamic_block_split_deterministic(ray_start_regular_shared, target_max_block_size) without return types