code: def test_gpu_groupby_agg(setup_gpu):
      rs = np.random.RandomState(0)
      df1 = pd.DataFrame(
          {
              "a": rs.choice([2, 3, 4], size=(100,)),
              "b": rs.choice([2, 3, 4], size=(100,)),
          }
      )
      mdf = md.DataFrame(df1, chunk_size=13).to_gpu()
  
      r = mdf.groupby("a").sum()
      pd.testing.assert_frame_equal(
          r.execute().fetch().to_pandas(), df1.groupby("a").sum()
      )
  
      r = mdf.groupby("a").kurt()
      pd.testing.assert_frame_equal(
          r.execute().fetch().to_pandas(), df1.groupby("a").kurt()
      )
  
      r = mdf.groupby("a").agg(["sum", "var"])
      pd.testing.assert_frame_equal(
          r.execute().fetch().to_pandas(),
          df1.groupby("a").agg(["sum", "var"]),
      )
  
      rs = np.random.RandomState(0)
      idx = pd.Index(np.where(rs.rand(10) > 0.5, "A", "B"))
      series1 = pd.Series(rs.rand(10), index=idx)
      ms = md.Series(series1, index=idx, chunk_size=3).to_gpu().to_gpu()
  
      r = ms.groupby(level=0).sum()
      pd.testing.assert_series_equal(
          r.execute().fetch().to_pandas(),
          series1.groupby(level=0).sum(),
      )
  
      r = ms.groupby(level=0).kurt()
      pd.testing.assert_series_equal(
          r.execute().fetch().to_pandas(),
          series1.groupby(level=0).kurt(),
      )
  
      r = ms.groupby(level=0).agg(["sum", "var"])
      pd.testing.assert_frame_equal(
          r.execute().fetch().to_pandas(),
          series1.groupby(level=0).agg(["sum", "var"]),
      )
  
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 9 for calling a global function with example usage: test_gpu_groupby_agg(setup_gpu) without return types