code: def test_series_aggregate(setup, check_ref_counts):
      all_aggs = [
          "sum",
          "prod",
          "min",
          "max",
          "count",
          "size",
          "mean",
          "var",
          "std",
          "sem",
          "skew",
          "kurt",
      ]
      data = pd.Series(
          np.random.rand(20),
          index=[str(i) for i in range(20)],
          name="a",
      )
      series = md.Series(data)
  
      result = series.agg(all_aggs)
      pd.testing.assert_series_equal(
          result.execute().fetch(), data.agg(all_aggs)
      )
  
      for func in all_aggs:
          result = series.agg(func)
          assert pytest.approx(result.execute().fetch()) == data.agg(
              func
          )
  
      series = md.Series(data, chunk_size=3)
  
      for func in all_aggs:
          result = series.agg(func)
          assert pytest.approx(result.execute().fetch()) == data.agg(
              func
          )
  
      result = series.agg(all_aggs)
      pd.testing.assert_series_equal(
          result.execute().fetch(), data.agg(all_aggs)
      )
  
      result = series.agg({"col_sum": "sum", "col_count": "count"})
      pd.testing.assert_series_equal(
          result.execute().fetch(),
          data.agg({"col_sum": "sum", "col_count": "count"}),
      )
  
      result = series.agg({"col_sum": sum, "col_count": "count"})
      pd.testing.assert_series_equal(
          result.execute().fetch(),
          data.agg({"col_sum": sum, "col_count": "count"}),
      )
  
      if _support_kw_agg:
          result = series.agg(col_var="var", col_skew="skew")
          pd.testing.assert_series_equal(
              result.execute().fetch(),
              data.agg(col_var="var", col_skew="skew"),
          )
  
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 20 for calling a global function with example usage: test_series_aggregate(setup, check_ref_counts) without return types