def METHOD_NAME(tx, person1_name, person2_name, knows_from):
    # To learn more about the Cypher syntax, see https://neo4j.com/docs/cypher-manual/current/
    # The Reference Card is also a good resource for keywords https://neo4j.com/docs/cypher-refcard/current/
    query = (
        "CREATE (p1:Person { name: $person1_name }) "
        "CREATE (p2:Person { name: $person2_name }) "
        "CREATE (p1)-[k:KNOWS { from: $knows_from }]->(p2) "
        "RETURN p1, p2, k"
    )
    result = tx.run(query, person1_name=person1_name,
                    person2_name=person2_name, knows_from=knows_from)
    try:
        return [{
                    "p1": row["p1"]["name"],
                    "p2": row["p2"]["name"],
                    "knows_from": row["k"]["from"]
                }
                for row in result]
    # Capture any errors along with the query and data for traceability
    except ServiceUnavailable as exception:
        logging.error("{query} raised an error: \n {exception}".format(
            query=query, exception=exception))
        raise