nodes: 0, module; 1, function_definition; 2, function_name:cumsum; 3, parameters; 4, block; 5, identifier:expr; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, expression_statement; 12, if_statement; 13, return_statement; 14, identifier:sort; 15, None; 16, identifier:ascending; 17, True; 18, identifier:unique; 19, False; 20, identifier:preceding; 21, None; 22, identifier:following; 23, None; 24, comment:"""
      Calculate cumulative summation of a sequence expression.
  
      :param expr: expression for calculation
      :param sort: name of the sort column
      :param ascending: whether to sort in ascending order
      :param unique: whether to eliminate duplicate entries
      :param preceding: the start point of a window
      :param following: the end point of a window
      :return: calculated column
      """; 25, comparison_operator:expr._data_type == types.boolean; 26, block; 27, else_clause; 28, call; 29, attribute; 30, attribute; 31, expression_statement; 32, block; 33, identifier:_cumulative_op; 34, argument_list; 35, identifier:expr; 36, identifier:_data_type; 37, identifier:types; 38, identifier:boolean; 39, assignment; 40, expression_statement; 41, identifier:expr; 42, identifier:CumSum; 43, keyword_argument; 44, keyword_argument; 45, keyword_argument; 46, keyword_argument; 47, keyword_argument; 48, keyword_argument; 49, identifier:output_type; 50, attribute; 51, assignment; 52, identifier:sort; 53, identifier:sort; 54, identifier:ascending; 55, identifier:ascending; 56, identifier:unique; 57, identifier:unique; 58, identifier:preceding; 59, identifier:preceding; 60, identifier:following; 61, identifier:following; 62, identifier:data_type; 63, identifier:output_type; 64, identifier:types; 65, identifier:int64; 66, identifier:output_type; 67, attribute; 68, identifier:expr; 69, identifier:_data_type
code: def cumsum(expr, sort=None, ascending=True, unique=False,
             preceding=None, following=None):
      """
      Calculate cumulative summation of a sequence expression.
  
      :param expr: expression for calculation
      :param sort: name of the sort column
      :param ascending: whether to sort in ascending order
      :param unique: whether to eliminate duplicate entries
      :param preceding: the start point of a window
      :param following: the end point of a window
      :return: calculated column
      """
      if expr._data_type == types.boolean:
          output_type = types.int64
      else:
          output_type = expr._data_type
      return _cumulative_op(expr, CumSum, sort=sort, ascending=ascending,
                            unique=unique, preceding=preceding,
                            following=following, data_type=output_type)