def save(
        self: TYetiObject,
        exclude_overwrite: list[str] = ["created", "tags", "context", "acls"],
    ) -> TYetiObject:
        """Inserts or updates a Yeti object into the database.

        We need to pass the JSON representation of the object to the database
        because it may contain fields that are not JSON serializable by arango.

        Args:
          exclude_overwrite: Exclude overwriting these fields if observable
            already exists in the database.

        Returns:
          The created Yeti object.
        """
        exclude = self._exclude_overwrite
        doc_dict = self.model_dump(exclude_unset=True, exclude=exclude)
        if doc_dict.get("id") is not None:
            exclude = ["acls"] + self._exclude_overwrite
            result = self._update(self.model_dump_json(exclude=exclude))
            event_type = message.EventType.update
        else:
            exclude = ["acls", "id"] + self._exclude_overwrite
            result = self._insert(self.model_dump_json(exclude=exclude))
            event_type = message.EventType.new
            if not result:
                exclude = exclude_overwrite + self._exclude_overwrite
                result = self._update(self.model_dump_json(exclude=exclude))
                event_type = message.EventType.update
        yeti_object = self.__class__(**result)
        if self._collection_name not in ("auditlog", "timeline"):
            try:
                event = message.ObjectEvent(type=event_type, yeti_object=yeti_object)
                producer.publish_event(event)
            except Exception:
                logging.exception("Error while publishing event")
        return yeti_object
Inserts or updates a Yeti object into the database.

        We need to pass the JSON representation of the object to the database
        because it may contain fields that are not JSON serializable by arango.

        Args:
          exclude_overwrite: Exclude overwriting these fields if observable
            already exists in the database.

        Returns:
          The created Yeti object.
        
core/database_arango.py