code: func MetadataHasDuplication(md *etcdraft.ConfigMetadata) error {
  	if md == nil {
  		return errors.New("nil metadata")
  	}
  
  	for _, consenter := range md.Consenters {
  		if consenter == nil {
  			return errors.New("nil consenter in metadata")
  		}
  	}
  
  	seen := make(map[string]struct{})
  	for _, consenter := range md.Consenters {
  		serverKey := string(consenter.ServerTlsCert)
  		clientKey := string(consenter.ClientTlsCert)
  		_, duplicateServerCert := seen[serverKey]
  		_, duplicateClientCert := seen[clientKey]
  		if duplicateServerCert || duplicateClientCert {
  			return errors.Errorf("duplicate consenter: server cert: %s, client cert: %s", serverKey, clientKey)
  		}
  
  		seen[serverKey] = struct{}{}
  		seen[clientKey] = struct{}{}
  	}
  	return nil
  }
docs: // MetadataHasDuplication returns an error if the metadata has duplication of consenters.
  // A duplication is defined by having a server or a client TLS certificate that is found
  // in two different consenters, regardless of the type of certificate (client/server).