def test_validate_query_invalid_types(self):
        """Test that queries with invalid types fail."""
        invalid_queries = [
            (123, "int"),
            (123.45, "float"),
            ([1, 2, 3], "list"),
            ({"a", "b"}, "set"),
            (object(), "arbitrary object")
        ]

        for invalid_query, description in invalid_queries:
            with self.subTest(query_type=description):
                with self.assertRaises(InvalidArgError) as cm:
                    validation.validate_query(invalid_query, SearchMethod.TENSOR)

                error_msg = str(cm.exception)
                self.assertIn("'q' must be a 'string', a 'dict', or 'None'", error_msg)
                self.assertIn(f"Received q of type `{type(invalid_query)}`", error_msg)
Test that queries with invalid types fail.
tests/unit_tests/marqo/tensor_search/test_validation.py