code: func SelectPeers(k int, peerPool []discovery.NetworkMember, filter RoutingFilter) []*comm.RemotePeer {
  	var res []*comm.RemotePeer
  	rand.Seed(int64(util.RandomUInt64()))
  	// Iterate over the possible candidates in random order
  	for _, index := range rand.Perm(len(peerPool)) {
  		// If we collected K peers, we can stop the iteration.
  		if len(res) == k {
  			break
  		}
  		peer := peerPool[index]
  		// For each one, check if it is a worthy candidate to be selected
  		if !filter(peer) {
  			continue
  		}
  		p := &comm.RemotePeer{PKIID: peer.PKIid, Endpoint: peer.PreferredEndpoint()}
  		res = append(res, p)
  	}
  	return res
  }
docs: // SelectPeers returns a slice of peers that match the routing filter