def aggregate_sum(aggr)
      sum = {}
      aggr.each do |ts, counterVals|
        sum[ts] = {} unless sum.has_key?ts
        counterVals.each do |obj, count|
          if obj.respond_to?(:enterprise_id)
            eid = obj.public_send(:enterprise_id).to_s
            sum[ts][eid] = sum[ts].fetch(eid, 0) + count
          end
        end
      end
      sum
    end
def aggregate_sum(aggr)
      sum = {}
      aggr.each do |ts, counterVals|
        sum[ts] = {} unless sum.has_key?ts
        counterVals.each do |obj, count|
          if obj.respond_to?(:enterprise_id)
            eid = obj.public_send(:enterprise_id).to_s
            sum[ts][eid] = sum[ts].fetch(eid, 0) + count
          end
        end
      end
      sum
    end
Aggregates to find the sum of all counters for an enterprise
   at a time
 @param [Hash] aggr The aggregated hash
 @return [Hash] The summed up hash