def edges_from_matchings(matching):
    """
    Identify all edges within a matching.

    Parameters
    ----------
    matching : list
        of all matchings returned by matching api

    Returns
    -------
    edges : list
        of all edge tuples
    """
    edges = []
    nodes = []
    # only address highest confidence matching?
    m = 0
    for match in matching:
        print(m)
        m += 1
        # only address good matchings
        if match['confidence'] > 0.95:
            # look through all legs
            for leg in match['legs']:
                # Extract all node sets
                node = leg['annotation']['nodes']
                for i in range(len(node) - 1):
                    if (node[i], node[i+1], 0) not in edges:
                        edges.append((node[i], node[i+1], 0))
    return edges