def to_mongo_dict(self, exclude_id: bool = True) -> dict[str, Any]:
        """Serializes the document to a MongoDB dictionary."""
        data = asdict(self)
        if exclude_id:
            data.pop("_id", None)
        if self.policy:
            data["policy"] = self.policy.value
        return data
Serializes the document to a MongoDB dictionary.
fiftyone/operators/store/models.py