code: func CreateProposalResponseFailure(hdrbytes []byte, payl []byte, response *peer.Response, results []byte, events []byte, ccid *peer.ChaincodeID, visibility []byte) (*peer.ProposalResponse, error) {
  	hdr, err := GetHeader(hdrbytes)
  	if err != nil {
  		return nil, err
  	}
  
  	// obtain the proposal hash given proposal header, payload and the requested visibility
  	pHashBytes, err := GetProposalHash1(hdr, payl, visibility)
  	if err != nil {
  		return nil, errors.WithMessage(err, "error computing proposal hash")
  	}
  
  	// get the bytes of the proposal response payload
  	prpBytes, err := GetBytesProposalResponsePayload(pHashBytes, response, results, events, ccid)
  	if err != nil {
  		return nil, err
  	}
  
  	resp := &peer.ProposalResponse{
  		// Timestamp: TODO!
  		Payload:  prpBytes,
  		Response: response,
  	}
  
  	return resp, nil
  }
docs: // CreateProposalResponseFailure creates a proposal response for cases where
  // endorsement proposal fails either due to a endorsement failure or a
  // chaincode failure (chaincode response status >= shim.ERRORTHRESHOLD)