code: def test_groupby_cum(setup):
      df1 = pd.DataFrame(
          {
              "a": [3, 5, 2, 7, 1, 2, 4, 6, 2, 4],
              "b": [8, 3, 4, 1, 8, 2, 2, 2, 2, 3],
              "c": [1, 8, 8, 5, 3, 5, 0, 0, 5, 4],
          }
      )
      mdf = md.DataFrame(df1, chunk_size=3)
  
      for fun in ["cummin", "cummax", "cumprod", "cumsum"]:
          r1 = getattr(mdf.groupby("b"), fun)()
          pd.testing.assert_frame_equal(
              r1.execute().fetch().sort_index(),
              getattr(df1.groupby("b"), fun)().sort_index(),
          )
  
          r2 = getattr(mdf.groupby("b"), fun)(axis=1)
          pd.testing.assert_frame_equal(
              r2.execute().fetch().sort_index(),
              getattr(df1.groupby("b"), fun)(axis=1).sort_index(),
          )
  
      r3 = mdf.groupby("b").cumcount()
      pd.testing.assert_series_equal(
          r3.execute().fetch().sort_index(),
          df1.groupby("b").cumcount().sort_index(),
      )
  
      series1 = pd.Series([3, 4, 5, 3, 5, 4, 1, 2, 3])
      ms1 = md.Series(series1, chunk_size=3)
  
      for fun in ["cummin", "cummax", "cumprod", "cumsum", "cumcount"]:
          r1 = getattr(ms1.groupby(lambda x: x % 2), fun)()
          pd.testing.assert_series_equal(
              r1.execute().fetch().sort_index(),
              getattr(
                  series1.groupby(lambda x: x % 2), fun
              )().sort_index(),
          )
  
imports: from collections import OrderedDict
  import numpy
  import pandas
  import pytest
  from ....None import dataframe
  from ....config import option_context
  from ....core.operand import OperandStage
  from ....tests.core import assert_groupby_equal, require_cudf
  from ....utils import arrow_array_to_objects, pd_release_version
  from ...core import DATAFRAME_OR_SERIES_TYPE
  from ..aggregation import DataFrameGroupByAgg
label_desc: Use image node_id 14 for calling a global function with example usage: test_groupby_cum(setup) without return types