@cached<EOL><INDENT>def symmetries(self):<DEDENT>
symmetry_cycles = set([])<EOL>symmetries = set([])<EOL>for match in GraphSearch(EqualPattern(self))(self):<EOL><INDENT>match.cycles = match.get_closed_cycles()<EOL>if match.cycles in symmetry_cycles:<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT>symmetry_cycles.add(match.cycles)<EOL>symmetries.add(match)<EOL><DEDENT>return symmetries<EOL>
Graph symmetries (permutations) that map the graph onto itself.