code: def test_groupby_basic(series, aggregation, pdf):
      gdf = cudf.DataFrame.from_pandas(pdf)
      gdf_grouped = gdf.groupby("xx")
      ddf_grouped = dask_cudf.from_cudf(gdf, npartitions=5).groupby(
          "xx"
      )
  
      if series:
          gdf_grouped = gdf_grouped.xx
          ddf_grouped = ddf_grouped.xx
  
      check_dtype = aggregation != "count"
  
      expect = getattr(gdf_grouped, aggregation)()
      actual = getattr(ddf_grouped, aggregation)()
  
      assert_cudf_groupby_layers(actual)
  
      dd.assert_eq(expect, actual, check_dtype=check_dtype)
  
      expect = gdf_grouped.agg({"xx": aggregation})
      actual = ddf_grouped.agg({"xx": aggregation})
  
      assert_cudf_groupby_layers(actual)
  
      dd.assert_eq(expect, actual, check_dtype=check_dtype)
  
imports: import numpy
  import pandas
  import pytest
  import dask
  from dask import dataframe
  from dask.utils_test import hlg_layer
  import cudf
  import dask_cudf
  from dask_cudf.groupby import OPTIMIZED_AGGS, _aggs_optimized
label_desc: Use image node_id 3 for calling a global function with example usage: test_groupby_basic(series, aggregation, pdf) without return types