#NEWLINE# def rolling_sum( self , event ) : #NEWLINE# #INDENT# ' Rolling sum\n\n        Get the sum of all buckets in the rolling counter for the given\n        :class:`RollingNumberEvent`.\n\n        The :class:`RollingNumberEvent` must be a **counter** type\n\n            >>> RollingNumberEvent.isCounter()\n            True\n\n        Args:\n            event (:class:`RollingNumberEvent`): Event defining which counter\n                to retrieve values from.\n\n        Returns:\n            long: Return value from the given :class:`RollingNumberEvent`\n                counter type.\n        ' #NEWLINE# last_bucket = self . current_bucket ( ) #NEWLINE# if ( not sum ) : #NEWLINE# #INDENT# return 0 #NEWLINE# #UNINDENT# sum = 0 #NEWLINE# for bucket in self . buckets : #NEWLINE# #INDENT# sum += bucket . adder ( event ) . sum ( ) #NEWLINE# #UNINDENT# return sum