code: def aggregate(self, event):
          
  
          total = event.null()
          for function in compat_itervalues(self.functions):
              try:
                  total = event.aggregate(total, function[event])
              except UndefinedEvent:
                  return
          self[event] = total
docs: Aggregate an event for the whole profile.