Notify about a deletion at an index_or_slice.

        :return: a function that notifies about an add at the same place.

def _notify_delete(self, index_or_slice):
        """Notify about a deletion at an index_or_slice.

        :return: a function that notifies about an add at the same place.
        """
        if isinstance(index_or_slice, int):
            length = len(self)
            if -length <= index_or_slice < length:
                self._notify_remove_at(index_or_slice)
                return lambda: self._notify_add_at(index_or_slice)
        elif isinstance(index_or_slice, slice):
            slice_ = slice(*index_or_slice.indices(len(self)))
            self._notify_remove(slice_)
            return lambda: self._notify_add(index_or_slice)