code: def test_series_cum_reduction(setup, check_ref_counts, func_name):
      def compute(data, **kwargs):
          return getattr(data, func_name)(**kwargs)
  
      data = pd.Series(
          np.random.rand(20),
          index=[str(i) for i in range(20)],
          name="a",
      )
      r = compute(md.Series(data))
      pd.testing.assert_series_equal(compute(data), r.execute().fetch())
  
      r = compute(md.Series(data, chunk_size=6))
      pd.testing.assert_series_equal(compute(data), r.execute().fetch())
  
      r = compute(md.Series(data, chunk_size=3))
      pd.testing.assert_series_equal(compute(data), r.execute().fetch())
  
      r = compute(md.Series(data, chunk_size=4), axis="index")
      pd.testing.assert_series_equal(
          compute(data, axis="index"), r.execute().fetch()
      )
  
      data = pd.Series(np.random.rand(20), name="a")
      data[0] = 0.1  # make sure not all elements are NAN
      data[data > 0.5] = np.nan
      r = compute(md.Series(data, chunk_size=3))
      pd.testing.assert_series_equal(compute(data), r.execute().fetch())
  
      r = compute(md.Series(data, chunk_size=3), skipna=False)
      pd.testing.assert_series_equal(
          compute(data, skipna=False), r.execute().fetch()
      )
  
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 17 for calling a global function with example usage: test_series_cum_reduction(setup, check_ref_counts, func_name) and returns: getattr