def from_marqo_document(cls, document: Dict, marqo_index: SemiStructuredMarqoIndex) -> "SemiStructuredVespaDocument":
        """
        Creates a SemiStructuredVespaDocument object from a Marqo document.

        Args:
            document (Dict): A dictionary representing a valid Marqo document. Must contain a '_id' field
                and can include various field types like strings, booleans, numbers, arrays and tensors.
            marqo_index (SemiStructuredMarqoIndex): The Marqo index object that this document belongs to.
                Used to determine index capabilities and settings.

        Returns:
            SemiStructuredVespaDocument: A new instance containing the document data structured for Vespa.

        Raises:
            MarqoDocumentParsingError: If the document is missing required fields or contains invalid data.

        Example:
            doc = {
                "_id": "doc1",
                "title": "Sample Document",
                "tags": ["tag1", "tag2"],
                "rating": 4.5
            }
            vespa_doc = SemiStructuredVespaDocument.from_marqo_document(doc, index)
        """
        index_supports_partial_updates = marqo_index.index_supports_partial_updates
        if index_constants.MARQO_DOC_ID not in document:
            # Please note we still use unstructured in the error message since it will be exposed to user
            raise MarqoDocumentParsingError(
                f"Unstructured Marqo document does not have a {index_constants.MARQO_DOC_ID} field. "
                f"This should be assigned for a valid document")

        doc_id = document[index_constants.MARQO_DOC_ID]
        instance = cls(
            id=doc_id,
            fixed_fields=SemiStructuredVespaDocumentFields(
                marqo__id=doc_id,
                version_uuid=generate_uuid_str() if index_supports_partial_updates else None,
            ),
            index_supports_partial_updates=index_supports_partial_updates
        )

        # Process regular fields
        cls._process_regular_fields(document, instance, marqo_index, doc_id)

        # Process tensor fields if present
        vector_count = cls._process_tensor_fields(document, instance, marqo_index)
        instance.fixed_fields.vector_counts = vector_count

        # Add multimodal params if present
        instance.fixed_fields.vespa_multimodal_params = document.get(common.MARQO_DOC_MULTIMODAL_PARAMS, {})

        return instance

        Creates a SemiStructuredVespaDocument object from a Marqo document.

        Args:
            document (Dict): A dictionary representing a valid Marqo document. Must contain a '_id' field
                and can include various field types like strings, booleans, numbers, arrays and tensors.
            marqo_index (SemiStructuredMarqoIndex): The Marqo index object that this document belongs to.
                Used to determine index capabilities and settings.

        Returns:
            SemiStructuredVespaDocument: A new instance containing the document data structured for Vespa.

        Raises:
            MarqoDocumentParsingError: If the document is missing required fields or contains invalid data.

        Example:
            doc = {
                "_id": "doc1",
                "title": "Sample Document",
                "tags": ["tag1", "tag2"],
                "rating": 4.5
            }
            vespa_doc = SemiStructuredVespaDocument.from_marqo_document(doc, index)
        
src/marqo/core/semi_structured_vespa_index/semi_structured_document.py