def METHOD_NAME(self):
    try:
        query = """MATCH (a) OPTIONAL MATCH (a)-[nonexistent_edge]->(nonexistent_node) CREATE (nonexistent_node)-[:E]->(a)"""
        redis_graph.query(query)
        assert(False)
    except redis.exceptions.ResponseError:
        # Expecting an error.
        pass
    try:
        query = """MATCH (a) OPTIONAL MATCH (a)-[nonexistent_edge]->(nonexistent_node) CREATE (a)-[:E]->(nonexistent_node)"""
        redis_graph.query(query)
        assert(False)
    except redis.exceptions.ResponseError:
        # Expecting an error.
        pass