code: func partitionMessages(pred common.MessageAcceptor, a []*emittedGossipMessage) ([]*emittedGossipMessage, []*emittedGossipMessage) {
  	s1 := []*emittedGossipMessage{}
  	s2 := []*emittedGossipMessage{}
  	for _, m := range a {
  		if pred(m) {
  			s1 = append(s1, m)
  		} else {
  			s2 = append(s2, m)
  		}
  	}
  	return s1, s2
  }
docs: // partitionMessages receives a predicate and a slice of gossip messages
  // and returns a tuple of two slices: the messages that hold for the predicate
  // and the rest