code: def test_groupby_categorical_key():
      # See https://github.com/rapidsai/cudf/issues/4608
      df = dask.datasets.timeseries()
      gddf = dask_cudf.from_dask_dataframe(df)
      gddf["name"] = gddf["name"].astype("category")
      ddf = gddf.to_dask_dataframe()
  
      got = gddf.groupby("name", sort=True).agg(
          {"x": ["mean", "max"], "y": ["mean", "count"]}
      )
      # Use `compute` to avoid upstream issue for now
      # (See: https://github.com/dask/dask/issues/9515)
      expect = (
          ddf.compute()
          .groupby("name", sort=True)
          .agg({"x": ["mean", "max"], "y": ["mean", "count"]})
      )
      dd.assert_eq(expect, got)
  
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 21 for calling a global function with example usage: test_groupby_categorical_key() without return types