code: func deduplicate(sds []IdentityAndSignature) []IdentityAndSignature {
  	ids := make(map[string]struct{})
  	result := make([]IdentityAndSignature, 0, len(sds))
  	for i, sd := range sds {
  		identity, err := sd.Identity()
  		if err != nil {
  			cauthdslLogger.Errorf("Principal deserialization failure (%s) for identity %d", err, i)
  			continue
  		}
  		key := identity.GetIdentifier().Mspid + identity.GetIdentifier().Id
  
  		if _, ok := ids[key]; ok {
  			cauthdslLogger.Warningf("De-duplicating identity [%s] at index %d in signature set", key, i)
  		} else {
  			result = append(result, sd)
  			ids[key] = struct{}{}
  		}
  	}
  	return result
  }
docs: // deduplicate removes any duplicated identities while otherwise preserving identity order