code: def test_listener_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],
          shard_number=N_SHARDS,
          replication_factor=N_REPLICAS,
      )
      wait_collection_exists_and_active_on_all_peers(
          collection_name=COLLECTION_NAME, peer_api_uris=peer_api_uris
      )
  
      upsert_random_points(peer_api_uris[0], 100)
  
      p = processes.pop()
      p.kill()
  
      peer_api_uris.pop()
  
      peer_api_uris.append(
          start_peer(
              peer_dirs[-1],
              f"peer_0_{N_PEERS}_restart.log",
              bootstrap_uri,
              port=20000,
              extra_env={
                  "QDRANT__STORAGE__NODE_TYPE": "Listener",
              },
          )
      )
  
      for peer_api_uri in peer_api_uris:
          wait_listener_node(peer_api_uri, COLLECTION_NAME)
  
      upsert_random_points(peer_api_uris[0], 100)
  
      query_vector = random_dense_vector()
      res1 = search(
          peer_api_uris[0],
          query_vector,
          city="London",
          collection=COLLECTION_NAME,
      )
  
      p = processes.pop()
      p.kill()
  
      peer_api_uris.pop()
  
      peer_api_uris.append(
          start_peer(
              peer_dirs[-1],
              f"peer_0_{N_PEERS}_restart_again.log",
              bootstrap_uri,
              port=20000,
              extra_env={
                  "QDRANT__STORAGE__NODE_TYPE": "Normal",
              },
          )
      )
  
      for peer_api_uri in peer_api_uris:
          wait_no_listener_node(peer_api_uri, COLLECTION_NAME)
  
      res2 = search(
          peer_api_uris[0],
          query_vector,
          city="London",
          collection=COLLECTION_NAME,
      )
  
      assert res1 == res2
  
file_path: qdrant/tests/consensus_tests/test_listener_node.py
imports: import logging
  import pathlib
  from .fixtures import create_collection, upsert_random_points, search, random_dense_vector
  from .utils import *
label_desc: Use image node_id 6 for calling a global function with example usage: test_listener_node(tmp_path) without return types