public Set<Node> voterNodes(Stream<Integer> voterIds, ListenerName listenerName) {
        return voterIds
            .map(voterId ->
                voterNode(voterId, listenerName).orElseThrow(() ->
                    new IllegalArgumentException(
                        String.format(
                            "Unable to find endpoint for voter %d and listener %s in %s",
                            voterId,
                            listenerName,
                            voters
                        )
                    )
                )
            )
            .collect(Collectors.toSet());
    }
Returns the node information for all the given voter ids and listener.

@param voterIds the ids of the voters
@param listenerName the name of the listener
@return the node information for all of the voter ids
@throws IllegalArgumentException if there are missing endpoints
raft/src/main/java/org/apache/kafka/raft/internals/VoterSet.java