code: def test_groupby_agg_params(
      npartitions, split_every, split_out, as_index
  ):
      df = cudf.datasets.randomdata(
          nrows=150,
          dtypes={"name": str, "a": int, "b": int, "c": float},
      )
      df["a"] = [0, 1, 2] * 50
      ddf = dask_cudf.from_cudf(df, npartitions)
      pddf = dd.from_pandas(df.to_pandas(), npartitions)
  
      agg_dict = {
          "a": "sum",
          "b": ["min", "max", "mean"],
          "c": ["mean", "std", "var"],
      }
  
      split_kwargs = {
          "split_every": split_every,
          "split_out": split_out,
      }
      if split_out == "use_dask_default":
          split_kwargs.pop("split_out")
  
      # Check `sort=True` behavior
      if split_out == 1:
          gf = (
              ddf.groupby(["name", "a"], sort=True, as_index=as_index)
              .aggregate(
                  agg_dict,
                  **split_kwargs,
              )
              .compute()
          )
          if as_index:
              # Groupby columns became the index.
              # Sorting the index should not change anything.
              dd.assert_eq(gf.index, gf.sort_index().index)
          else:
              # Groupby columns are did NOT become the index.
              # Sorting by these columns should not change anything.
              sort_cols = [("name", ""), ("a", "")]
              dd.assert_eq(
                  gf[sort_cols],
                  gf[sort_cols].sort_values(sort_cols),
                  check_index=False,
              )
  
      # Full check (`sort=False`)
      gr = ddf.groupby(
          ["name", "a"], sort=False, as_index=as_index
      ).aggregate(
          agg_dict,
          **split_kwargs,
      )
      pr = pddf.groupby(["name", "a"], sort=False).agg(
          agg_dict,
          **split_kwargs,
      )
  
      # Test `as_index` argument
      if as_index:
          # Groupby columns should NOT be in columns
          assert ("name", "") not in gr.columns and (
              "a",
              "",
          ) not in gr.columns
      else:
          # Groupby columns SHOULD be in columns
          assert ("name", "") in gr.columns and ("a", "") in gr.columns
  
      # Check `split_out` argument
      assert gr.npartitions == (
          1 if split_out == "use_dask_default" else split_out
      )
  
      # Compute for easier multiindex handling
      gf = gr.compute()
      pf = pr.compute()
  
      # Reset index and sort by groupby columns
      if as_index:
          gf = gf.reset_index(drop=False)
      sort_cols = [("name", ""), ("a", ""), ("c", "mean")]
      gf = gf.sort_values(sort_cols).reset_index(drop=True)
      pf = (
          pf.reset_index(drop=False)
          .sort_values(sort_cols)
          .reset_index(drop=True)
      )
  
      dd.assert_eq(gf, pf)
  
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 22 for calling a global function with example usage: test_groupby_agg_params(npartitions, split_every, split_out, as_index) without return types