def from_vespa_document(cls, document: Dict) -> "UnstructuredVespaDocument":
        """Instantiate an UnstructuredVespaDocument from a Vespa document."""
        fields = document.get(cls._VESPA_DOC_FIELDS, {})

        raw_lexical_score = fields.pop(unstructured_common.VESPA_DOC_HYBRID_RAW_LEXICAL_SCORE) \
            if unstructured_common.VESPA_DOC_HYBRID_RAW_LEXICAL_SCORE in fields else None
        raw_tensor_score = fields.pop(unstructured_common.VESPA_DOC_HYBRID_RAW_TENSOR_SCORE) \
            if unstructured_common.VESPA_DOC_HYBRID_RAW_TENSOR_SCORE in fields else None

        return cls(id=document[cls._VESPA_DOC_ID],
                   raw_tensor_score=raw_tensor_score,
                   raw_lexical_score=raw_lexical_score,
                   fields=UnstructuredVespaDocumentFields(**fields))
Instantiate an UnstructuredVespaDocument from a Vespa document.
src/marqo/core/unstructured_vespa_index/unstructured_document.py