public PartitionChangeBuilder setTargetIsrWithBrokerStates(List<BrokerState> targetIsrWithEpoch) {
        return setTargetIsr(
            targetIsrWithEpoch
              .stream()
              .map(BrokerState::brokerId)
              .collect(Collectors.toList())
        );
    }
Prefer replicas in the ISR but keep the partition online even if it requires picking a leader that is not in the ISR.
metadata/src/main/java/org/apache/kafka/controller/PartitionChangeBuilder.java