def get_edge(s, t, source_label, target_label, edge_label):
    """Get edge by the ids of its incident nodes."""
    query =\
        "MATCH (n:{} {{id: '{}'}})-[rel:{}]->(m:{} {{id: '{}'}})".format(
            source_label, s, edge_label, target_label, t) +\
        "RETURN rel\n"

    return query