private static Node[] convertToNodeArray(List<Integer> replicaIds, Map<Integer, Node> nodesById) {
        return replicaIds.stream().map(replicaId -> {
            Node node = nodesById.get(replicaId);
            if (node == null)
                return new Node(replicaId, "", -1);
            return node;
        }).toArray(Node[]::new);
    }
Get a snapshot of the cluster metadata from this response
@return the cluster snapshot
clients/src/main/java/org/apache/kafka/common/requests/MetadataResponse.java