def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def _exiter(self) -> Optional[Exiter]:
            return ExceptionSink.get_global_exiter()