def G2DFS(G):
    """
        Converts a graph object into a DFScode tuple sequence
    """
    DFScode = []
    for e in G.edges:
        DFScode.append((e.from_vertex.id, e.to_vertex.id,
            e.from_vertex.label, e.to_vertex.label, e.label))
    return DFScode