code: def get_replicas(
      self,
      deployment: str,
      head: bool,
      entity_id: Optional[int] = None,
      increase_access_count: bool = True,
  ) -> Optional[_ReplicaList]:
      # returns all replicas of a given deployment, using a given shard
      if deployment in self._deployments:
          type_ = "heads" if head else "shards"
          if entity_id is None and head:
              entity_id = 0
          return self._get_connection_list(
              deployment, type_, entity_id, increase_access_count
          )
      else:
          self._logger.debug(
              f"Unknown deployment {deployment}, no replicas available"
          )
          return None
  
file_path: jina/jina/serve/networking/connection_pool_map.py
imports: import os
  from typing import TYPE_CHECKING, Dict, List, Optional, Sequence
  from jina.logging.logger import JinaLogger
  from jina.serve.networking.instrumentation import _NetworkingHistograms, _NetworkingMetrics
  from jina.serve.networking.replica_list import _ReplicaList
label_desc: Use image node_id 4 for calling the _ConnectionPoolMap obj's underlying member method code with example usage: obj.get_replicas(deployment, head, entity_id, increase_access_count) and returns: self, None