def check_next_match(self, match, new_relations, subject_graph, one_match):
<EOL>if len(match) == <NUM_LIT:3>:<EOL><INDENT>if match.forward[<NUM_LIT:1>] < match.forward[<NUM_LIT:2>]:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>for vertex1 in new_relations.values():<EOL><INDENT>if vertex1 < match.forward[<NUM_LIT:0>]:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>for vertex1 in new_relations.values():<EOL><INDENT>paths = list(subject_graph.iter_shortest_paths(vertex1, match.forward[<NUM_LIT:0>]))<EOL>if len(paths) != <NUM_LIT:1>:<EOL><INDENT>return False<EOL><DEDENT>if len(paths[<NUM_LIT:0>]) != (len(match)+<NUM_LIT:1>)//<NUM_LIT:2>:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return True<EOL>
Check if the (onset for a) match can be a valid (part of a) ring