code: def test_update_empty_vectors():
      """
      Remove all named vectors for a point. Then add named vectors and test
      against it.
      """
  
      response = request_with_validation(
          api="/collections/{collection_name}/points/vectors/delete",
          method="POST",
          path_params={"collection_name": collection_name},
          body={"points": [1], "vector": ["image", "text"]},
      )
      assert response.ok
  
      response = request_with_validation(
          api="/collections/{collection_name}/points/{id}",
          method="GET",
          path_params={"collection_name": collection_name, "id": 1},
      )
      assert response.ok
      result = response.json()["result"]
      assert "text" not in result["vector"]
      assert "image" not in result["vector"]
  
      text_vector = [
          0.34035879,
          0.344099,
          0.3478392,
          0.35157941,
          0.35531961,
          0.35905982,
          0.36280003,
          0.36654023,
      ]
      response = request_with_validation(
          api="/collections/{collection_name}/points/vectors",
          method="PUT",
          path_params={"collection_name": collection_name},
          query_params={"wait": "true"},
          body={
              "points": [
                  {
                      "id": 1,
                      "vector": {
                          "text": text_vector,
                      },
                  }
              ]
          },
      )
      assert response.ok
  
      response = request_with_validation(
          api="/collections/{collection_name}/points/{id}",
          method="GET",
          path_params={"collection_name": collection_name, "id": 1},
      )
      assert response.ok
      result = response.json()["result"]
      assert compare_vectors(result["vector"]["text"], text_vector)
      assert "image" not in result["vector"]
  
      image_vector = [0.19, 0.28, 0.37, 0.46]
      response = request_with_validation(
          api="/collections/{collection_name}/points/vectors",
          method="PUT",
          path_params={"collection_name": collection_name},
          query_params={"wait": "true"},
          body={
              "points": [
                  {
                      "id": 1,
                      "vector": {
                          "image": image_vector,
                      },
                  }
              ]
          },
      )
      assert response.ok
  
      response = request_with_validation(
          api="/collections/{collection_name}/points/{id}",
          method="GET",
          path_params={"collection_name": collection_name, "id": 1},
      )
      assert response.ok
      result = response.json()["result"]
      assert compare_vectors(result["vector"]["image"], image_vector)
      assert compare_vectors(result["vector"]["text"], text_vector)
  
file_path: qdrant/openapi/tests/openapi_integration/test_optional_vectors.py
imports: import pytest
  from .helpers.collection_setup import drop_collection, multivec_collection_setup
  from .helpers.helpers import request_with_validation
label_desc: Use image node_id 7 for calling a global function with example usage: test_update_empty_vectors() without return types