def common_edges(graph1, graph2):
    """Return a list of all edges that occur both in graph1 and
    graph2.

    """
    edges = []
    for edge in graph2.edges():
        if graph1.contains_edge(edge):
            edges.append((edge, graph1.get_edge(*edge)))
    return edges
