code: def test_groupby(setup):
      rs = np.random.RandomState(0)
      data_size = 100
      data_dict = {
          "a": rs.randint(0, 10, size=(data_size,)),
          "b": rs.randint(0, 10, size=(data_size,)),
          "c": rs.choice(list("abcd"), size=(data_size,)),
      }
  
      # test groupby with DataFrames and RangeIndex
      df1 = pd.DataFrame(data_dict)
      mdf = md.DataFrame(df1, chunk_size=13)
      grouped = mdf.groupby("b")
      assert_groupby_equal(grouped.execute().fetch(), df1.groupby("b"))
  
      # test groupby with string index with duplications
      df2 = pd.DataFrame(
          data_dict, index=["i" + str(i % 3) for i in range(data_size)]
      )
      mdf = md.DataFrame(df2, chunk_size=13)
      grouped = mdf.groupby("b")
      assert_groupby_equal(grouped.execute().fetch(), df2.groupby("b"))
  
      # test groupby with DataFrames by series
      grouped = mdf.groupby(mdf["b"])
      assert_groupby_equal(
          grouped.execute().fetch(), df2.groupby(df2["b"])
      )
  
      # test groupby with DataFrames by multiple series
      grouped = mdf.groupby(by=[mdf["b"], mdf["c"]])
      assert_groupby_equal(
          grouped.execute().fetch(),
          df2.groupby(by=[df2["b"], df2["c"]]),
      )
  
      # test groupby with DataFrames with MultiIndex
      df3 = pd.DataFrame(
          data_dict,
          index=pd.MultiIndex.from_tuples(
              [(i % 3, "i" + str(i)) for i in range(data_size)]
          ),
      )
      mdf = md.DataFrame(df3, chunk_size=13)
      grouped = mdf.groupby(level=0)
      assert_groupby_equal(
          grouped.execute().fetch(), df3.groupby(level=0)
      )
  
      # test groupby with DataFrames by integer columns
      df4 = pd.DataFrame(list(data_dict.values())).T
      mdf = md.DataFrame(df4, chunk_size=13)
      grouped = mdf.groupby(0)
      assert_groupby_equal(grouped.execute().fetch(), df4.groupby(0))
  
      series1 = pd.Series(data_dict["a"])
      ms1 = md.Series(series1, chunk_size=13)
      grouped = ms1.groupby(lambda x: x % 3)
      assert_groupby_equal(
          grouped.execute().fetch(), series1.groupby(lambda x: x % 3)
      )
  
      # test groupby series
      grouped = ms1.groupby(ms1)
      assert_groupby_equal(
          grouped.execute().fetch(), series1.groupby(series1)
      )
  
      series2 = pd.Series(
          data_dict["a"], index=["i" + str(i) for i in range(data_size)]
      )
      ms2 = md.Series(series2, chunk_size=13)
      grouped = ms2.groupby(lambda x: int(x[1:]) % 3)
      assert_groupby_equal(
          grouped.execute().fetch(),
          series2.groupby(lambda x: int(x[1:]) % 3),
      )
  
imports: from collections import OrderedDict
  import numpy
  import pandas
  import pytest
  from ....None import dataframe
  from ....config import option_context
  from ....core.operand import OperandStage
  from ....tests.core import assert_groupby_equal, require_cudf
  from ....utils import arrow_array_to_objects, pd_release_version
  from ...core import DATAFRAME_OR_SERIES_TYPE
  from ..aggregation import DataFrameGroupByAgg
label_desc: Use image node_id 1 for calling a global function with example usage: test_groupby(setup) without return types