code: def test_repartition_shuffle_arrow(ray_start_regular_shared):
      ds = ray.data.range(20, parallelism=10)
      assert ds.num_blocks() == 10
      assert ds.count() == 20
      assert ds._block_num_rows() == [2] * 10
  
      ds2 = ds.repartition(5, shuffle=True)
      assert ds2.num_blocks() == 5
      assert ds2.count() == 20
      assert ds2._block_num_rows() == [10, 10, 0, 0, 0]
  
      ds3 = ds2.repartition(20, shuffle=True)
      assert ds3.num_blocks() == 20
      assert ds3.count() == 20
      assert ds3._block_num_rows() == [2] * 10 + [0] * 10
  
      large = ray.data.range(10000, parallelism=10)
      large = large.repartition(20, shuffle=True)
      assert large._block_num_rows() == [500] * 20
  
imports: import itertools
  import math
  import random
  import time
  from unittest.mock import patch
  import numpy
  import pandas
  import pyarrow
  import pytest
  import ray
  from ray.data.aggregate import AggregateFn, Count, Max, Mean, Min, Quantile, Std, Sum
  from ray.data.context import DataContext
  from ray.data.tests.conftest import *
  from ray.data.tests.util import column_udf, named_values
  from ray.tests.conftest import *
label_desc: Use image node_id 10 for calling a global function with example usage: test_repartition_shuffle_arrow(ray_start_regular_shared) without return types