code: def test_cum_sum(pd_es):
      log_value_feat = IdentityFeature(pd_es["log"].ww["value"])
      dfeat = Feature(
          IdentityFeature(pd_es["sessions"].ww["device_type"]),
          dataframe_name="log",
      )
      cum_sum = Feature(log_value_feat, groupby=dfeat, primitive=CumSum)
      features = [cum_sum]
      df = calculate_feature_matrix(
          entityset=pd_es,
          features=features,
          instance_ids=range(15),
      )
      cvalues = df[cum_sum.get_name()].values
      assert len(cvalues) == 15
      cum_sum_values = [
          0,
          5,
          15,
          30,
          50,
          0,
          1,
          3,
          6,
          6,
          50,
          55,
          55,
          62,
          76,
      ]
      for i, v in enumerate(cum_sum_values):
          assert v == cvalues[i]
  
imports: import numpy
  import pandas
  from woodwork.column_schema import ColumnSchema
  from woodwork.logical_types import Datetime
  from featuretools import Feature, GroupByTransformFeature, IdentityFeature, calculate_feature_matrix, feature_base
  from featuretools.computational_backends.feature_set import FeatureSet
  from featuretools.computational_backends.feature_set_calculator import FeatureSetCalculator
  from featuretools.primitives import CumCount, CumMax, CumMean, CumMin, CumSum, Last
  from featuretools.primitives.base import TransformPrimitive
  from featuretools.synthesis import dfs
  from featuretools.tests.testing_utils import feature_with_name
label_desc: Use image node_id 1 for calling a global function with example usage: test_cum_sum(pd_es) without return types