code: def test_payload_indexing_operations():
      # create payload
      response = request_with_validation(
          api="/collections/{collection_name}/points/payload",
          method="POST",
          path_params={"collection_name": collection_name},
          query_params={"wait": "true"},
          body={"payload": {"test_payload": "keyword"}, "points": [6]},
      )
      assert response.ok
  
      response = request_with_validation(
          api="/collections/{collection_name}",
          method="GET",
          path_params={"collection_name": collection_name},
      )
      assert response.ok
  
      # Create index
      response = request_with_validation(
          api="/collections/{collection_name}/index",
          method="PUT",
          path_params={"collection_name": collection_name},
          query_params={"wait": "true"},
          body={
              "field_name": "test_payload",
              "field_schema": "keyword",
          },
      )
      assert response.ok
  
      response = request_with_validation(
          api="/collections/{collection_name}",
          method="GET",
          path_params={"collection_name": collection_name},
      )
      assert response.ok
      assert (
          response.json()["result"]["payload_schema"]["test_payload"][
              "data_type"
          ]
          == "keyword"
      )
  
      # Delete index
      response = request_with_validation(
          api="/collections/{collection_name}/index/{field_name}",
          method="DELETE",
          path_params={
              "collection_name": collection_name,
              "field_name": "test_payload",
          },
          query_params={"wait": "true"},
      )
      assert response.ok
  
      response = request_with_validation(
          api="/collections/{collection_name}",
          method="GET",
          path_params={"collection_name": collection_name},
      )
      assert response.ok
      assert len(response.json()["result"]["payload_schema"]) == 0
  
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 2 for calling a global function with example usage: test_payload_indexing_operations() without return types