code: def test_dataframe_aggregate(setup, check_ref_counts):
      all_aggs = [
          "sum",
          "prod",
          "min",
          "max",
          "count",
          "size",
          "mean",
          "var",
          "std",
          "sem",
          "skew",
          "kurt",
      ]
      data = pd.DataFrame(np.random.rand(20, 20))
  
      df = md.DataFrame(data)
      result = df.agg(all_aggs)
      pd.testing.assert_frame_equal(
          result.execute().fetch(), data.agg(all_aggs)
      )
  
      result = df.agg("size")
      if _agg_size_as_series:
          pd.testing.assert_series_equal(
              result.execute().fetch(), data.agg("size")
          )
      else:
          assert result.execute().fetch() == data.agg("size")
  
      for func in (a for a in all_aggs if a != "size"):
          result = df.agg(func)
          pd.testing.assert_series_equal(
              result.execute().fetch(), data.agg(func)
          )
  
          result = df.agg(func, axis=1)
          pd.testing.assert_series_equal(
              result.execute().fetch(), data.agg(func, axis=1)
          )
  
      df = md.DataFrame(data, chunk_size=3)
  
      # will redirect to transform
      result = df.agg(["cumsum", "cummax"])
      pd.testing.assert_frame_equal(
          result.execute().fetch(), data.agg(["cumsum", "cummax"])
      )
  
      result = df.agg("size")
      if _agg_size_as_series:
          pd.testing.assert_series_equal(
              result.execute().fetch(), data.agg("size")
          )
      else:
          assert result.execute().fetch() == data.agg("size")
  
      for func in (a for a in all_aggs if a != "size"):
          result = df.agg(func)
          pd.testing.assert_series_equal(
              result.execute().fetch(), data.agg(func)
          )
  
          result = df.agg(func, axis=1)
          pd.testing.assert_series_equal(
              result.execute().fetch(), data.agg(func, axis=1)
          )
  
      result = df.agg(["sum"])
      pd.testing.assert_frame_equal(
          result.execute().fetch(), data.agg(["sum"])
      )
  
      result = df.agg([sum])
      pd.testing.assert_frame_equal(
          result.execute().fetch(), data.agg([sum])
      )
  
      result = df.agg(all_aggs)
      pd.testing.assert_frame_equal(
          result.execute().fetch(), data.agg(all_aggs)
      )
  
      result = df.agg(all_aggs, axis=1)
      pd.testing.assert_frame_equal(
          result.execute().fetch(), data.agg(all_aggs, axis=1)
      )
  
      result = df.agg(
          {0: ["sum", "min", "var"], 9: ["mean", "var", "std"]}
      )
      pd.testing.assert_frame_equal(
          result.execute().fetch(),
          data.agg(
              {0: ["sum", "min", "var"], 9: ["mean", "var", "std"]}
          ),
      )
  
      result = df.agg({0: [sum, min, max]})
      pd.testing.assert_frame_equal(
          result.execute().fetch(),
          data.agg({0: [sum, min, max]}),
      )
  
      if _support_kw_agg:
          agg_kw = dict(
              sum_0=NamedAgg(0, "sum"),
              min_0=NamedAgg(0, "min"),
              mean_9=NamedAgg(9, "mean"),
          )
          result = df.agg(**agg_kw)
          pd.testing.assert_frame_equal(
              result.execute().fetch(), data.agg(**agg_kw)
          )
  
imports: from typing import NamedTuple
  import numpy
  import pytest
  import pandas
  from ....None import dataframe
  from ....config import option_context
  from ....session import get_default_session
  from ....tests.core import require_cudf, require_cupy
  from ....utils import lazy_import, pd_release_version
  from ...None import CustomReduction, NamedAgg
  from ...base import to_gpu
label_desc: Use image node_id 19 for calling a global function with example usage: test_dataframe_aggregate(setup, check_ref_counts) without return types