code: def test_groupby_auto_on_cluster():
      rs = np.random.RandomState(0)
      raw = pd.DataFrame(
          {
              "c1": rs.randint(20, size=100),
              "c2": rs.choice(["a", "b", "c"], (100,)),
              "c3": rs.rand(100),
          }
      )
      # test DataFrameGroupByAgg._tile_auto_on_distributed
      with option_context({"chunk_store_limit": 80}):
          # chunk_store_limit is 30, each chunk's size is 8,
          # will combine once, then shuffle 5 combined chunk
          mdf = md.DataFrame(raw, chunk_size=5)
          tiled_mdf = tile(mdf)
          r = mdf.groupby("c2").sum()
          func_infos = DataFrameGroupByAgg._compile_funcs(r.op, mdf)
          tiled = DataFrameGroupByAgg._build_tree_and_shuffle_chunks(
              r.op,
              tiled_mdf,
              r,
              func_infos,
              tiled_mdf.chunks[:4],
              [8] * 4,
          )[0]
          assert len(tiled.chunks) == 5
  
imports: from collections import OrderedDict
  import numpy
  import pandas
  import pytest
  from ..sort import DataFrameGroupbySortShuffle
  from ....None import dataframe
  from ....None import opcodes
  from ....config import option_context
  from ....core import OutputType, tile
  from ....core.operand import OperandStage
  from ...core import DataFrameGroupBy, SeriesGroupBy, DataFrame
  from ..core import DataFrameGroupByOperand, DataFrameShuffleProxy
  from ..aggregation import DataFrameGroupByAgg
  from ..getitem import GroupByIndex
label_desc: Use image node_id 4 for calling a global function with example usage: test_groupby_auto_on_cluster() without return types