docs: private ProposalResponse sendProposalSerially(TransactionRequest proposalRequest, Collection<Peer> peers) throws
              ProposalException {
  
          ProposalException lastException = new ProposalException("ProposalRequest failed.");
  
          for (Peer peer : peers) {
  
              proposalRequest.submitted = false;
  
              try {
  
                  Collection<ProposalResponse> proposalResponses = sendProposal(proposalRequest, Collections.singletonList(peer));
  
                  if (proposalResponses.isEmpty()) {
                      logger.warn(format("Proposal request to peer %s failed", peer));
                  }
                  ProposalResponse proposalResponse = proposalResponses.iterator().next();
                  ChaincodeResponse.Status status = proposalResponse.getStatus();
  
                  if (status.getStatus() < 400) {
                      return proposalResponse;
  
                  } else if (status.getStatus() > 499) { // server error may work on other peer.
  
                      lastException = new ProposalException(format("Channel %s got exception on peer %s %d. %s ",
                              name,
                              peer,
                              status.getStatus(),
                              proposalResponse.getMessage()));
  
                  } else { // 400 to 499
  
                      throw new ProposalException(format("Channel %s got exception on peer %s %d. %s ",
                              name,
                              peer,
                              status.getStatus(),
                              proposalResponse.getMessage()));
                  }
  
              } catch (Exception e) {
  
                  lastException = new ProposalException(format("Channel %s failed proposal on peer %s  %s",
                          name,
                          peer.getName(),
  
                          e.getMessage()), e);
                  logger.warn(lastException.getMessage());
              }
  
          }
  
          throw lastException;
  
      }