code: def get_states(peer_api_uri: str, collection_name: str):
      res = requests.get(
          f"{peer_api_uri}/collections/{collection_name}/cluster",
          timeout=10,
      )
      assert_http_ok(res)
      cluster = res.json()["result"]
      all_shard_states = []
      for shard in cluster["local_shards"]:
          all_shard_states.append(shard["state"])
      for shard in cluster["remote_shards"]:
          all_shard_states.append(shard["state"])
  
      return all_shard_states
  
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 1 for calling a global function with example usage: get_states(peer_api_uri, collection_name) and returns: all_shard_states