code: func (ea *endorsementAnalyzer) PeersForEndorsement(chainID common.ChainID, interest *discovery.ChaincodeInterest) (*discovery.EndorsementDescriptor, error) {
  	chanMembership, err := ea.PeersAuthorizedByCriteria(chainID, interest)
  	if err != nil {
  		return nil, errors.WithStack(err)
  	}
  	channelMembersById := chanMembership.ByID()
  	// Choose only the alive messages of those that have joined the channel
  	aliveMembership := ea.Peers().Intersect(chanMembership)
  	membersById := aliveMembership.ByID()
  	// Compute a mapping between the PKI-IDs of members to their identities
  	identitiesOfMembers := computeIdentitiesOfMembers(ea.IdentityInfo(), membersById)
  	principalsSets, err := ea.computePrincipalSets(chainID, interest)
  	if err != nil {
  		logger.Warningf("Principal set computation failed: %v", err)
  		return nil, errors.WithStack(err)
  	}
  
  	return ea.computeEndorsementResponse(&context{
  		chaincode:           interest.Chaincodes[0].Name,
  		channel:             string(chainID),
  		principalsSets:      principalsSets,
  		channelMembersById:  channelMembersById,
  		aliveMembership:     aliveMembership,
  		identitiesOfMembers: identitiesOfMembers,
  	})
  }
docs: // PeersForEndorsement returns an EndorsementDescriptor for a given set of peers, channel, and chaincode