code: def test_shard_snapshot_recovery_errors():
      # Invalid collection name
      response = request_with_validation(
          api="/collections/{collection_name}/shards/{shard_id}/snapshots/recover",
          method="PUT",
          path_params={
              "shard_id": 0,
              "collection_name": "somethingthatdoesnotexist",
          },
          body={
              "location": "whatever",
          },
      )
      assert response.status_code == 404
  
      # Invalid file url
      response = request_with_validation(
          api="/collections/{collection_name}/shards/{shard_id}/snapshots/recover",
          method="PUT",
          path_params={
              "shard_id": 0,
              "collection_name": collection_name,
          },
          body={
              "location": "file:///whatever.snapshot",
          },
      )
      assert response.status_code == 400
  
      response = request_with_validation(
          api="/collections/{collection_name}/shards/{shard_id}/snapshots/recover",
          method="PUT",
          path_params={
              "shard_id": 0,
              "collection_name": collection_name,
          },
          body={
              "location": "http://localhost:6333/snapshots/whatever.snapshot",
          },
      )
      assert response.status_code == 400
  
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 4 for calling a global function with example usage: test_shard_snapshot_recovery_errors() without return types