def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def __notify(self):
        if self.__observer is not None:
            self.__observer.notify(self.__means, self.__variances, self.__clusters)