code: def test_remove_node(tmp_path: pathlib.Path):
      assert_project_root()
  
      peer_api_uris, peer_dirs, bootstrap_uri = start_cluster(
          tmp_path, N_PEERS
      )
  
      create_collection(peer_api_uris[0])
      wait_collection_exists_and_active_on_all_peers(
          collection_name="test_collection", peer_api_uris=peer_api_uris
      )
  
      upsert_points(peer_api_uris[0], "Paris")
  
      search_result = search(peer_api_uris[0], "Paris")
      assert len(search_result) > 0
  
      # Kill last peer
  
      p = processes.pop()
      p.kill()
  
      # Validate search works with the dead node
      search_result = search(peer_api_uris[0], "Paris")
      assert len(search_result) > 0
  
      # Validate upsert works with the dead node
      upsert_points(peer_api_uris[0], "Berlin")
  
      # Assert that there are dead replicas
      wait_for_some_replicas_not_active(
          peer_api_uris[0], "test_collection"
      )
  
      # Assert all records were changed
      search_result = search(peer_api_uris[0], "Paris")
      assert len(search_result) == 0
  
      collection_cluster_info = get_collection_cluster_info(
          peer_api_uris[0], "test_collection"
      )
      dead_peer = [
          shard["peer_id"]
          for shard in collection_cluster_info["remote_shards"]
          if shard["state"] != "Active"
      ]
  
      assert len(dead_peer) > 1
  
      # force remove dead peer
      res = requests.delete(
          f"{peer_api_uris[0]}/cluster/peer/{dead_peer[0]}?force=true"
      )
      assert_http_ok(res)
  
      # Assert all records were changed
      search_result = search(peer_api_uris[0], "Paris")
      assert len(search_result) == 0
  
      # Assert all records were changed
      search_result = search(peer_api_uris[0], "Berlin")
      assert len(search_result) > 0
  
imports: import pathlib
  from .utils import *
  from .assertions import assert_http_ok
label_desc: Use image node_id 4 for calling a global function with example usage: test_remove_node(tmp_path) without return types