def get_vertices_connections_via_another_edge(mesh, v1, v2,
                                              allowed_edges=None):
    """
    Find mutual connection (vertex) via another edges from vertices v1 and
    v2.
    """
    # get all edges connected to v1 or v2
    e_v1 = mesh.ve[v1]
    e_v2 = mesh.ve[v2]
    if allowed_edges is not None:
        e_v1 = [e for e in e_v1 if e in allowed_edges]
        e_v2 = [e for e in e_v2 if e in allowed_edges]
    # get all vertices of edges e_v1 or e_v2
    v_e_v1 = set(mesh.edges[e_v1].reshape(-1))
    v_e_v2 = set(mesh.edges[e_v2].reshape(-1))
    # get the vertex intersection
    inter_vertices = set.intersection(v_e_v1, v_e_v2)
    return inter_vertices