def _last_index(self, s):
        self.set_index(max(0, self._find_one_after_last_labeled_index() - 1))
def test_can_encode_relationship_with_names(self):
        a = Node("Person", name="Alice")
        b = Node("Person", name="Bob")
        ab = KNOWS(a, b)
        encoded = cypher_repr(ab, related_node_template="{property.name}")
        self.assertEqual("(Alice)-[:KNOWS {}]->(Bob)", encoded)