code: def test_groupby_arrow_multicolumn(
      ray_start_regular_shared, num_parts
  ):
      # Test built-in mean aggregation on multiple columns
      seed = int(time.time())
      print(
          f"Seeding RNG for test_groupby_arrow_multicolumn with: {seed}"
      )
      random.seed(seed)
      xs = list(range(100))
      random.shuffle(xs)
      df = pd.DataFrame(
          {"A": [x % 3 for x in xs], "B": xs, "C": [2 * x for x in xs]}
      )
      agg_ds = (
          ray.data.from_pandas(df)
          .repartition(num_parts)
          .groupby("A")
          .mean(["B", "C"])
      )
      assert agg_ds.count() == 3
      assert list(agg_ds.sort("A").iter_rows()) == [
          {"A": 0, "mean(B)": 49.5, "mean(C)": 99.0},
          {"A": 1, "mean(B)": 49.0, "mean(C)": 98.0},
          {"A": 2, "mean(B)": 50.0, "mean(C)": 100.0},
      ]
  
      # Test that unspecified agg column ==> agg on all columns except for
      # groupby keys.
      agg_ds = (
          ray.data.from_pandas(df)
          .repartition(num_parts)
          .groupby("A")
          .mean()
      )
      assert agg_ds.count() == 3
      assert list(agg_ds.sort("A").iter_rows()) == [
          {"A": 0, "mean(B)": 49.5, "mean(C)": 99.0},
          {"A": 1, "mean(B)": 49.0, "mean(C)": 98.0},
          {"A": 2, "mean(B)": 50.0, "mean(C)": 100.0},
      ]
  
      # Test built-in global mean aggregation
      df = pd.DataFrame({"A": xs, "B": [2 * x for x in xs]})
      result_row = (
          ray.data.from_pandas(df)
          .repartition(num_parts)
          .mean(["A", "B"])
      )
      assert result_row["mean(A)"] == df["A"].mean()
      assert result_row["mean(B)"] == df["B"].mean()
  
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 25 for calling a global function with example usage: test_groupby_arrow_multicolumn(ray_start_regular_shared, num_parts) without return types