def METHOD_NAME(
    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