def METHOD_NAME(clean_database, query):
    """
    Test writing a graph to a Neo4j instance.
    """
    graph = query[0]
    t = Transformer()
    sink = NeoSink(
        owner=t,
        uri=DEFAULT_NEO4J_URL,
        username=DEFAULT_NEO4J_USERNAME,
        password=DEFAULT_NEO4J_PASSWORD,
    )
    for n, data in graph.nodes(data=True):
        sink.write_node(data)
    for u, v, k, data in graph.edges(data=True, keys=True):
        sink.write_edge(data)
    sink.finalize()
    nr = sink.session.run("MATCH (n) RETURN count(n)")
    [node_counts] = [x for x in nr][0]
    assert node_counts >= query[1]
    er = sink.session.run("MATCH ()-[p]->() RETURN count(p)")
    [edge_counts] = [x for x in er][0]
    assert edge_counts >= query[2]