def aggregate(self, event):
        """Aggregate an event for the whole profile."""

        total = event.null()
        for function in self.functions.values():
            try:
                total = event.aggregate(total, function[event])
            except UndefinedEvent:
                return
        self[event] = total
Aggregate an event for the whole profile.
recipes/Python/578138_gprof2dotpy/recipe-578138.py