def _iter_candidate_groups(self, init_match, edges0, edges1):
<EOL>sources = {}<EOL>for start_vertex0, end_vertex0 in edges0:<EOL><INDENT>l = sources.setdefault(start_vertex0, [])<EOL>l.append(end_vertex0)<EOL><DEDENT>dests = {}<EOL>for start_vertex1, end_vertex1 in edges1:<EOL><INDENT>start_vertex0 = init_match.reverse[start_vertex1]<EOL>l = dests.setdefault(start_vertex0, [])<EOL>l.append(end_vertex1)<EOL><DEDENT>for start_vertex0, end_vertices0 in sources.items():<EOL><INDENT>end_vertices1 = dests.get(start_vertex0, [])<EOL>yield end_vertices0, end_vertices1<EOL><DEDENT>
Divide the edges into groups