def test_add_prefix_to_multimodal_queries(self):
        """Ensures that prefix gets added to each query."""
        for index in [self.unstructured_index_1, self.structured_text_index]:
            with self.subTest(index=index.type):
                # Single text query (prefix added)
                queries = [BulkSearchQueryEntity(q="hello", text_query_prefix="PREFIX: ", index=index)]
                prefixed_queries = tensor_search.add_prefix_to_queries(queries)
                self.assertEqual(prefixed_queries[0].q, "PREFIX: hello")

                # Dict query (text has prefix, image does not)
                queries = [BulkSearchQueryEntity(
                    q={"text query": 0.5,
                       TestImageUrls.HIPPO_REALISTIC.value: 0.5},
                    text_query_prefix="PREFIX: ",
                    index=index
                )]

                prefixed_queries = tensor_search.add_prefix_to_queries(queries)
                self.assertEqual(prefixed_queries[0].q, {"PREFIX: text query": 0.5,
                                                         TestImageUrls.HIPPO_REALISTIC.value: 0.5})
Ensures that prefix gets added to each query.
tests/integ_tests/tensor_search/test_prefix.py