def copy_edges(g, graph1, name=None, **kwd):
    """
    .. versionadded:: 0.1.12

    Used by :func:`link_nodes` to copy edges
    """
    if name is None:
        name = graph1.name
    for node1, node2, data in graph1.edges_iter(data=True):
        data = data.copy()
        data.update(kwd)
        g.add_edge('{0}_{1}'.format(name, node1), '{0}_{1}'.format(name,
            node2), **data)
