def _find_matching_edge(edge, graph):
    """
    Retrieve an edge matching the edge inserted from the graph.
    :param edge: The edge to find.
    :param graph: The graph to find it in.
    :return: The edge including attributes.
    """
    edges_data = graph.out_edges([edge[0]], data=True)
    edges = [edge_data[0:2] for edge_data in edges_data]
    matching_edge_index = edges.index(edge)
    return edges_data[matching_edge_index]