code: def test_single_vs_batch():
      # Bunch of valid examples
      params_list = [
          {
              "positive": [1, 2],
              "negative": [3, 4],
              "limit": 1,
          },
          {
              "positive": [1],
              "negative": [3, 4],
              "limit": 1,
          },
          {
              # no negative because it's optional with this strategy
              "negative": [4, 5],
              "exact": True,
              "strategy": "best_score",
              "limit": 1,
          },
          {
              "positive": [2, 3],
              "negative": [4, 5],
              "strategy": "best_score",
              "limit": 1,
          },
          {
              "positive": [2, 3],
              "negative": [4, 5],
              "exact": True,
              "strategy": "best_score",
              "limit": 1,
          },
          {
              "positive": [8],
              "negative": [],
              "exact": True,
              "strategy": "average_vector",
              "limit": 1,
          },
      ]
  
      batch_response = request_with_validation(
          api="/collections/{collection_name}/points/recommend/batch",
          method="POST",
          path_params={"collection_name": collection_name},
          body={"searches": params_list},
      )
  
      assert batch_response.ok
      assert len(batch_response.json()["result"]) == len(params_list)
  
      # Compare against sequential single searches
      for i, params in enumerate(params_list):
          single_response = request_with_validation(
              api="/collections/{collection_name}/points/recommend",
              method="POST",
              path_params={"collection_name": collection_name},
              body=params,
          )
          assert single_response.ok
          assert (
              single_response.json()["result"]
              == batch_response.json()["result"][i]
          )
  
file_path: qdrant/openapi/tests/openapi_integration/test_recommend.py
imports: import pytest
  from .helpers.collection_setup import basic_collection_setup, drop_collection
  from .helpers.helpers import request_with_validation
label_desc: Use image node_id 3 for calling a global function with example usage: test_single_vs_batch() without return types