code: def test_sort_with_multiple_keys(
      ray_start_regular, descending, batch_format
  ):
      num_items = 1000
      num_blocks = 100
      df = pd.DataFrame(
          {
              "a": [random.choice("ABCD") for _ in range(num_items)],
              "b": [x % 3 for x in range(num_items)],
              "c": [
                  bool(random.getrandbits(1)) for _ in range(num_items)
              ],
          }
      )
      ds = ray.data.from_pandas(df).map_batches(
          lambda t: t,
          batch_format=batch_format,
          batch_size=None,
      )
      df.sort_values(
          ["a", "b", "c"], inplace=True, ascending=not descending
      )
      sorted_ds = ds.repartition(num_blocks).sort(
          ["a", "b", "c"], descending=descending
      )
  
      # Number of blocks is preserved
      assert len(sorted_ds._block_num_rows()) == num_blocks
      # Rows are sorted over the dimensions
      assert [
          tuple(row.values()) for row in sorted_ds.iter_rows()
      ] == list(zip(df["a"], df["b"], df["c"]))
  
imports: import random
  from collections import defaultdict
  import numpy
  import pandas
  import pyarrow
  import pytest
  import ray
  from ray.data import Dataset
  from ray.data._internal.planner.exchange.push_based_shuffle_task_scheduler import PushBasedShuffleTaskScheduler
  from ray.data._internal.sort import SortKey
  from ray.data.block import BlockAccessor
  from ray.data.context import DataContext
  from ray.data.tests.conftest import *
  from ray.data.tests.util import extract_values
  from ray.tests.conftest import *
label_desc: Use image node_id 6 for calling a global function with example usage: test_sort_with_multiple_keys(ray_start_regular, descending, batch_format) without return types