code: func (vdb *VersionedDB) retrieveMetadata(nsKeysMap map[string][]string) (map[string][]*couchdb.DocMetadata, error) {
  	// consturct one batch per namespace
  	nsMetadataRetrievers := []batch{}
  	for ns, keys := range nsKeysMap {
  		db, err := vdb.getNamespaceDBHandle(ns)
  		if err != nil {
  			return nil, err
  		}
  		nsMetadataRetrievers = append(nsMetadataRetrievers, &nsMetadataRetriever{ns: ns, db: db, keys: keys})
  	}
  	if err := executeBatches(nsMetadataRetrievers); err != nil {
  		return nil, err
  	}
  	// accumulate results from each batch
  	executionResults := make(map[string][]*couchdb.DocMetadata)
  	for _, r := range nsMetadataRetrievers {
  		nsMetadataRetriever := r.(*nsMetadataRetriever)
  		executionResults[nsMetadataRetriever.ns] = nsMetadataRetriever.executionResult
  	}
  	return executionResults, nil
  }
docs: // retrievedMetadata retrievs the metadata for a collection of `namespace-keys` combination