def _find_pivot_addr(self, index):
        """Inserting by slicing can lead into situation where no addresses are
        selected. In that case a pivot address has to be chosen so we know
        where to add characters.
        """
        if not self.addresses or index.start == 0:
            return CharAddress('', self.tree, 'text', -1)  # string beginning
        if index.start > len(self.addresses):
            return self.addresses[-1]
        return self.addresses[index.start]
Inserting by slicing can lead into situation where no addresses are
        selected. In that case a pivot address has to be chosen so we know
        where to add characters.