def test_split_prefix_preprocess_text_with_prefix(self, mock_preprocess):
        """Check that the text is split and preprocessed correctly with a prefix.

        The preprocessor should take the prefixed text as input, while the chunk
        should not include the prefix.
        """
        content = ["This is a test sentence", "Test"]
        preprocessor = CLIPPreprocessor()
        preprocessing_config = TextPreprocessingConfig(
            should_chunk=True,
            chunk_config=TextChunkConfig(split_method="word", split_length=3, split_overlap=1),
            text_prefix="this is a prefix: "
        )
        results = split_prefix_preprocess_text(content, preprocessor, preprocessing_config)
        self.assertEqual(len(results), 2)
        result_1 = results[0]
        self.assertTrue(isinstance(result_1, list))
        self.assertEqual(len(result_1), 2)
        self.assertTrue(all(isinstance(t, tuple) for t in result_1))
        self.assertTrue(all(isinstance(t[0], str) for t in result_1))
        self.assertTrue(all(not t.startswith("this is a prefix: ") for t, _ in result_1))
        self.assertEqual("This is a", result_1[0][0])
        self.assertEqual("a test sentence", result_1[1][0])

        self.assertTrue(all(isinstance(t[1], torch.Tensor) for t in result_1))

        result_2 = results[1]
        self.assertTrue(isinstance(result_2, list))
        self.assertEqual(len(result_2), 1)
        self.assertTrue(all(isinstance(t, tuple) for t in result_2))
        self.assertTrue(all(isinstance(t[0], str) for t in result_2))
        self.assertTrue(all(not t.startswith("this is a prefix: ") for t, _ in result_2))
        self.assertEqual("Test", result_2[0][0])
        self.assertTrue(all(isinstance(t[1], torch.Tensor) for t in result_2))

        mock_preprocess.assert_called()
        for call in mock_preprocess.call_kwargs_list:
            args, _ = call
            for text in args[0]:
                self.assertTrue(text.startswith("this is a prefix: "))
Check that the text is split and preprocessed correctly with a prefix.

        The preprocessor should take the prefixed text as input, while the chunk
        should not include the prefix.
        
tests/unit_tests/marqo/inference/media_download_and_preprocess/test_chunk_download_preprocess_text_content.py