code: def assert_cudf_groupby_layers(ddf):
      for prefix in ("cudf-aggregate-chunk", "cudf-aggregate-agg"):
          try:
              hlg_layer(ddf.dask, prefix)
          except KeyError:
              raise AssertionError(
                  "Expected Dask dataframe to contain groupby layer with "
                  f"prefix {prefix}"
              )
  
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 1 for calling a global function with example usage: assert_cudf_groupby_layers(ddf) without return types