def MatchVertex(graph1, graph2, vertexId1, vertexId2):
    """Returns True if vertices, corresponding to given vertex IDs in given graphs, match;
       i.e., same attributes and temporal edges."""
    # First check for same attributes
    vertex1 = graph1.vertices[vertexId1]
    vertex2 = graph2.vertices[vertexId2]
    if not (vertex1.attributes == vertex2.attributes):
        return False
    if (len(vertex1.edges) != len(vertex2.edges)):
        return False
    # Temporal field only set if discovering temporal patterns; otherwise, this test always True
    if (vertex1.temporal != vertex2.temporal):
        return False
    return True