def test_upsert_nodes_and_get(neo4j_store: Neo4jPropertyGraphStore):
    """
    Test inserting entity and chunk nodes, then retrieving them.
    """
    entity = EntityNode(label="PERSON", name="Alice")
    chunk = ChunkNode(text="Alice is a software engineer.")
    neo4j_store.upsert_nodes([entity, chunk])

    # Get by ID
    retrieved_entities = neo4j_store.get(ids=[entity.id])
    assert len(retrieved_entities) == 1
    assert isinstance(retrieved_entities[0], EntityNode)
    assert retrieved_entities[0].name == "Alice"

    retrieved_chunks = neo4j_store.get(ids=[chunk.id])
    assert len(retrieved_chunks) == 1
    assert isinstance(retrieved_chunks[0], ChunkNode)
    assert retrieved_chunks[0].text == "Alice is a software engineer."

    # Get by property
    retrieved_by_prop = neo4j_store.get(properties={"name": "Alice"})
    assert len(retrieved_by_prop) == 1
    assert retrieved_by_prop[0].id == entity.id

    # Attempt to get unknown property
    unknown_prop = neo4j_store.get(properties={"non_existent_prop": "foo"})
    assert len(unknown_prop) == 0

    Test inserting entity and chunk nodes, then retrieving them.
    
llama-index-integrations/graph_stores/llama-index-graph-stores-neo4j/tests/test_pg_stores_neo4j.py