def to_mongo_dict(self, include_id=False):
        """Serializes the document to a BSON dictionary equivalent to the
        representation that would be stored in the database.

        Args:
            include_id (False): whether to include the document ID

        Returns:
            a BSON dict
        """
        d = self._doc.to_dict()
        if not include_id:
            d.pop("_id", None)

        return d
Serializes the document to a BSON dictionary equivalent to the
        representation that would be stored in the database.

        Args:
            include_id (False): whether to include the document ID

        Returns:
            a BSON dict
        
fiftyone/core/document.py