'Initialize graph matcher.
Parameters
G1, G2: graph
The graphs to be tested.
node_match: callable
A function that returns True iff node n1 in G1 and n2 in G2
should be considered equal during the isomorphism test. The
function will be called like::
node_match(G1.node[n1], G2.node[n2])
That is, the function will receive the node attribute dictionaries
of the nodes under consideration. If None, then no attributes are
considered when testing for an isomorphism.
edge_match: callable
A function that returns True iff the edge attribute dictionary for
the pair of nodes (u1, v1) in G1 and (u2, v2) in G2 should be
considered equal during the isomorphism test. The function will be
called like::
edge_match(G1[u1][v1], G2[u2][v2])
That is, the function will receive the edge attribute dictionaries
of the edges under consideration. If None, then no attributes are
considered when testing for an isomorphism.'

def __init__(self, G1, G2, node_match=None, edge_match=None):

    vf2.GraphMatcher.__init__(self, G1, G2)
    self.node_match = node_match
    self.edge_match = edge_match
    self.G1_adj = self.G1.adj
    self.G2_adj = self.G2.adj
