code: func (pair comparablePrincipalSetPair) MergeWithPlurality() ComparablePrincipalSet {
  	var principalsToAdd []*ComparablePrincipal
  	used := make(map[int]struct{})
  	// Iterate over the contained set and for each principal
  	for _, principal := range pair.contained {
  		var covered bool
  		// Search a principal in the containing set to cover the principal in the contained set
  		for i, coveringPrincipal := range pair.containing {
  			// The principal found shouldn't be used twice
  			if _, isUsed := used[i]; isUsed {
  				continue
  			}
  			// All identities that satisfy the found principal, should satisfy the covered principal as well.
  			if coveringPrincipal.IsA(principal) {
  				used[i] = struct{}{}
  				covered = true
  				break
  			}
  		}
  		// If we haven't found a cover to the principal, it's because we already used up all the potential candidates
  		// among the containing set, so just add it to the principals set to be added later.
  		if !covered {
  			principalsToAdd = append(principalsToAdd, principal)
  		}
  	}
  
  	res := pair.containing.Clone()
  	res = append(res, principalsToAdd...)
  	return res
  }
docs: // EnsurePlurality returns a ComparablePrincipalSet such that plurality requirements over
  // the contained ComparablePrincipalSet in the comparablePrincipalSetPair hold