def subdivideEdge(G):
    """
    Given a graph G, returns a graph in which the
    edges of G are subdivided.

    INPUT
    G: A networkx graph

    OUTPUT
    Ge: The edge subdivision of G
    """
    Ge = G.copy()
    edges = G.edges()
    for edge in edges:
        Ge.remove_edge(*edge)
        Ge.add_node(str(edge))
        Ge.add_edge(edge[0], str(edge))
        Ge.add_edge(edge[1], str(edge))
    return Ge
