code: func SelectEndpoints(k int, peerPool []discovery.NetworkMember) []*comm.RemotePeer {
  	if len(peerPool) < k {
  		k = len(peerPool)
  	}
  
  	indices := util.GetRandomIndices(k, len(peerPool)-1)
  	endpoints := make([]*comm.RemotePeer, len(indices))
  	for i, j := range indices {
  		endpoints[i] = &comm.RemotePeer{Endpoint: peerPool[j].PreferredEndpoint(), PKIID: peerPool[j].PKIid}
  	}
  	return endpoints
  }
docs: // SelectEndpoints select k peers from peerPool and returns them.