def integrate(self, outevent, inevent):
<EOL>assert outevent not in self<EOL>for function in compat_itervalues(self.functions):<EOL><INDENT>assert outevent not in function<EOL>assert inevent in function<EOL>for call in compat_itervalues(function.calls):<EOL><INDENT>assert outevent not in call<EOL>if call.callee_id != function.id:<EOL><INDENT>assert call.ratio is not None<EOL><DEDENT><DEDENT><DEDENT>for cycle in self.cycles:<EOL><INDENT>total = inevent.null()<EOL>for function in compat_itervalues(self.functions):<EOL><INDENT>total = inevent.aggregate(total, function[inevent])<EOL><DEDENT>self[inevent] = total<EOL><DEDENT>total = inevent.null()<EOL>for function in compat_itervalues(self.functions):<EOL><INDENT>total = inevent.aggregate(total, function[inevent])<EOL>self._integrate_function(function, outevent, inevent)<EOL><DEDENT>self[outevent] = total<EOL>
Propagate function time ratio along the function calls.

        Must be called after finding the cycles.

        See also:
        - http://citeseer.ist.psu.edu/graham82gprof.html