def _check_graph(self, graph):
if graph.num_vertices != self.size:<EOL><INDENT>raise TypeError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>if (self.numbers != graph.numbers).any():<EOL><INDENT>raise TypeError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>
the atomic numbers must match