def _content_preprocessing(self) -> List[LanguagebindPreprocessedContent]:
        """
        Preprocess the content based on the modality.

        Returns:
            List[LanguagebindPreprocessedContent]: The preprocessed content.
        """

        modality = self.inference_request.modality
        supported_modalities = self.model.model_properties.supportedModalities

        if modality not in supported_modalities:
            raise UnsupportedModalityError(
                f"The model does not support the requested modality. "
                f"The supported modalities are: {supported_modalities}, "
                f"but received '{modality}'. Please check your documents or queries, remove the unsupported content, "
                f"and try again"
            )

        if modality == Modality.TEXT:
            results = split_prefix_preprocess_text(
                self.inference_request.contents,
                self.model.get_preprocessor(),
                self.inference_request.preprocessing_config
            )
        elif modality in [Modality.IMAGE, Modality.AUDIO, Modality.VIDEO]:
            results = download_and_preprocess_media(
                self.inference_request.contents,
                self.model.get_preprocessor(),
                self.inference_request.preprocessing_config,
                self.inference_request.return_individual_error
            )
        else:
            raise ValueError(f"Unsupported modality: {self.inference_request.modality}")
        return results

        Preprocess the content based on the modality.

        Returns:
            List[LanguagebindPreprocessedContent]: The preprocessed content.
        
src/marqo/inference/native_inference/inference_pipeline/languagebind_model_inference_pipeline.py