def find_cycles(self):
<EOL>stack = []<EOL>data = {}<EOL>order = <NUM_LIT:0><EOL>for function in compat_itervalues(self.functions):<EOL><INDENT>order = self._tarjan(function, order, stack, data)<EOL><DEDENT>cycles = []<EOL>for function in compat_itervalues(self.functions):<EOL><INDENT>if function.cycle is not None and function.cycle not in cycles:<EOL><INDENT>cycles.append(function.cycle)<EOL><DEDENT><DEDENT>self.cycles = cycles<EOL>if <NUM_LIT:0>:<EOL><INDENT>for cycle in cycles:<EOL><INDENT>sys.stderr.write("<STR_LIT>")<EOL>for member in cycle.functions:<EOL><INDENT>sys.stderr.write("<STR_LIT>" % member.name)<EOL><DEDENT><DEDENT><DEDENT>
Find cycles using Tarjan's strongly connected components algorithm.