code: def test_shard_snapshot_operations_non_wait():
      # there no snapshot on collection
      response = request_with_validation(
          api="/collections/{collection_name}/shards/{shard_id}/snapshots",
          method="GET",
          path_params={
              "shard_id": 0,
              "collection_name": collection_name,
          },
      )
      assert response.ok
      assert len(response.json()["result"]) == 0
  
      # create snapshot on collection
      response = request_with_validation(
          api="/collections/{collection_name}/shards/{shard_id}/snapshots",
          method="POST",
          path_params={
              "shard_id": 0,
              "collection_name": collection_name,
          },
          query_params={"wait": "false"},
      )
      assert response.status_code == 202
  
      # validate it exists
      snapshot_name = None
      while True:
          try:
              response = request_with_validation(
                  api="/collections/{collection_name}/shards/{shard_id}/snapshots",
                  method="GET",
                  path_params={
                      "shard_id": 0,
                      "collection_name": collection_name,
                  },
              )
              assert response.ok
              assert len(response.json()["result"]) == 1
              snapshot_name = response.json()["result"][0]["name"]
              break
          except AssertionError:
              # wait for snapshot to be created
              sleep(0.1)
              continue
  
      # delete it
      response = request_with_validation(
          api="/collections/{collection_name}/shards/{shard_id}/snapshots/{snapshot_name}",
          method="DELETE",
          path_params={
              "shard_id": 0,
              "collection_name": collection_name,
              "snapshot_name": snapshot_name,
          },
          query_params={"wait": "false"},
      )
      assert response.status_code == 202
  
      # validate it is gone
      while True:
          try:
              response = request_with_validation(
                  api="/collections/{collection_name}/shards/{shard_id}/snapshots",
                  method="GET",
                  path_params={
                      "shard_id": 0,
                      "collection_name": collection_name,
                  },
              )
              assert response.ok
              assert len(response.json()["result"]) == 0
              break
          except AssertionError:
              # wait for snapshot to be deleted
              sleep(0.1)
              continue
  
imports: from time import sleep
  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_shard_snapshot_operations_non_wait() without return types