def METHOD_NAME(self, row, count, parent=QModelIndex()):
    end = row + count
    self.beginRemoveRows(parent, row, end)
    try:
        for name in self._names[row:end]:
            snippets.delete(name)
        del self._names[row:end]
    finally:
        self.endRemoveRows()
        return True