code: public List<RaftMemberContext> getPassiveMemberStates(Comparator<RaftMemberContext> comparator) {
      List<RaftMemberContext> passiveMembers = new ArrayList<>(getPassiveMemberStates());
      passiveMembers.sort(comparator);
      return passiveMembers;
    }
docs: Returns a list of passive members.
  
  @param comparator A comparator with which to sort the members list.
  @return The sorted members list.