def complete(self, match, subject_graph):
if not CustomPattern.complete(self, match, subject_graph):<EOL><INDENT>return False<EOL><DEDENT>if self.strong:<EOL><INDENT>if self.size % <NUM_LIT:2> == <NUM_LIT:0>:<EOL><INDENT>for i in range(self.size//<NUM_LIT:2>):<EOL><INDENT>vertex1_start = match.forward[i]<EOL>vertex1_stop = match.forward[(i+self.size//<NUM_LIT:2>)%self.size]<EOL>paths = list(subject_graph.iter_shortest_paths(vertex1_start, vertex1_stop))<EOL>if len(paths) != <NUM_LIT:2>:<EOL><INDENT>return False<EOL><DEDENT>for path in paths:<EOL><INDENT>if len(path) != self.size//<NUM_LIT:2>+<NUM_LIT:1>:<EOL><INDENT>return False<EOL><DEDENT><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>for i in range(self.size//<NUM_LIT:2>+<NUM_LIT:1>):<EOL><INDENT>vertex1_start = match.forward[i]<EOL>vertex1_stop = match.forward[(i+self.size//<NUM_LIT:2>)%self.size]<EOL>paths = list(subject_graph.iter_shortest_paths(vertex1_start, vertex1_stop))<EOL>if len(paths) > <NUM_LIT:1>:<EOL><INDENT>return False<EOL><DEDENT>if len(paths[<NUM_LIT:0>]) != self.size//<NUM_LIT:2>+<NUM_LIT:1>:<EOL><INDENT>return False<EOL><DEDENT>vertex1_stop = match.forward[(i+self.size//<NUM_LIT:2>+<NUM_LIT:1>)%self.size]<EOL>paths = list(subject_graph.iter_shortest_paths(vertex1_start, vertex1_stop))<EOL>if len(paths) > <NUM_LIT:1>:<EOL><INDENT>return False<EOL><DEDENT>if len(paths[<NUM_LIT:0>]) != self.size//<NUM_LIT:2>+<NUM_LIT:1>:<EOL><INDENT>return False<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return True<EOL>
Check the completeness of the ring match