def _get_triples(query: str, e_labels: List[str]) -> List[str]:
    """Get the node-edge->node triple combinations."""
    triple_query = """
        MATCH (a)-[e:`{e_label}`]->(b)
        WITH a,e,b LIMIT 3000
        RETURN DISTINCT labels(a) AS from, type(e) AS edge, labels(b) AS to
        LIMIT 10
        """

    triple_template = "(:`{a}`)-[:`{e}`]->(:`{b}`)"
    triple_schema = []
    for label in e_labels:
        q = triple_query.format(e_label=label)
        data = query(q)
        for d in data:
            triple = triple_template.format(a=d["from"][0], e=d["edge"], b=d["to"][0])
            triple_schema.append(triple)

    return triple_schema
Get the node-edge->node triple combinations.
llama-index-integrations/graph_stores/llama-index-graph-stores-neptune/llama_index/graph_stores/neptune/neptune.py