def test_09_delete_nodes_by_properties(neo4j_store):
    """
    Test deleting nodes by a property dict.
    """
    c1 = ChunkNode(text="This is a test chunk.", properties={"lang": "en"})
    c2 = ChunkNode(text="Another chunk.", properties={"lang": "fr"})
    neo4j_store.upsert_nodes([c1, c2])

    # Delete all English chunks
    neo4j_store.delete(properties={"lang": "en"})

    # Only c2 remains
    remaining = neo4j_store.get()
    assert len(remaining) == 1
    assert remaining[0].properties["lang"] == "fr"

    Test deleting nodes by a property dict.
    
llama-index-integrations/graph_stores/llama-index-graph-stores-neo4j/tests/test_pg_stores_neo4j.py