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

        Returns:
            List[RandomModelPreprocessedContent]: The preprocessed content.
        """
        if self.inference_request.modality == Modality.TEXT:
            results = split_prefix_preprocess_text(
                self.inference_request.contents,
                self.model.get_preprocessor(),
                self.inference_request.preprocessing_config
            )
        elif self.inference_request.modality == Modality.IMAGE:
            return [[(content, content), ] for content in self.inference_request.contents]
        else:
            raise ValueError(f"Unsupported modality: {modality}")
        return results

        Preprocess the content based on the modality.

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