def edge_is_present(G, source, target):
    """
    Returns true of there is an edge from source to target

    Parameters
    source, target: igraph vertex indices

    G: directed igraph object
    """
    return G.get_eid(v1=source, v2=target, directed=True, error=False) != -1