code: public static Pair<AbstractTopology, Set<Integer>> mutateRemoveHosts(AbstractTopology currentTopology,
                                                                           Set<Integer>  removalHosts) {
          Set<Integer> removalPartitionIds = getPartitionIdsForHosts(currentTopology, removalHosts);
          return Pair.of(new AbstractTopology(currentTopology, removalHosts, removalPartitionIds), removalPartitionIds);
      }
docs: Remove hosts from an existing topology
  
  @param currentTopology to extend
  @param removalHostInfos   hosts to be removed from topology
  @return update {@link AbstractTopology} with remaining hosts and removed partition IDs
  @throws RuntimeException if hosts are not valid for topology