with driver.session() as session: session.run("MATCH (n) DETACH DELETE n") print("Graph has been reset - all nodes and relationships deleted.")