code: def start_cluster_with_corrupted_node(
      shard_number,
      replication_factor,
      write_consistency_factor,
      tmp_path,
  ):
      assert_project_root()
  
      peer_urls, peer_dirs, bootstrap_url = start_cluster(
          tmp_path, N_PEERS
      )
  
      create_collection(
          peer_urls[0],
          shard_number=shard_number,
          replication_factor=replication_factor,
          write_consistency_factor=write_consistency_factor,
      )
  
      wait_collection_exists_and_active_on_all_peers(
          collection_name="test_collection",
          peer_api_uris=peer_urls,
      )
  
      upsert_random_points(peer_urls[0], 100)
  
      # Kill the last peer
      processes.pop().kill()
  
      # Find a local shard inside the collection
      collection_path = (
          Path(peer_dirs[-1])
          / "storage"
          / "collections"
          / COLLECTION_NAME
      )
  
      segments_path = next(
          filter(
              lambda segments: segments.exists(),
              map(
                  lambda shard: shard / "segments",
                  collection_path.iterdir(),
              ),
          )
      )
  
      # Find a segment inside a local shard
      segment_path = next(
          filter(lambda path: path.is_dir(), segments_path.iterdir())
      )
  
      # Corrupt `segment.json` file inside a segment (to trigger collection load failure)
      segment_json_path = segment_path / "segment.json"
  
      with open(segment_json_path, "a") as segment_json_file:
          segment_json_file.write("borked")
  
      # Restart the peer
      peer_url = start_peer(
          peer_dirs[-1],
          f"peer_0_restarted.log",
          bootstrap_url,
          extra_env={
              "QDRANT__STORAGE__HANDLE_COLLECTION_LOAD_ERRORS": "true"
          },
      )
  
      wait_for_peer_online(peer_url)
  
      return peer_url
  
file_path: qdrant/tests/consensus_tests/test_dummy_shard.py
imports: import pathlib
  import shutil
  from requests import get, post, put, delete
  from .fixtures import create_collection, upsert_random_points, random_dense_vector, search
  from .utils import *
  from .assertions import assert_http_ok
label_desc: Use image node_id 4 for calling a global function with example usage: start_cluster_with_corrupted_node(shard_number, replication_factor, write_consistency_factor, tmp_path) and returns: peer_url