code: func doShardedQueryStat(c context.Context, ns string, stat queryStat) error {
  	results := &queryResult{}
  	if err := parallel.FanOutIn(func(ch chan<- func() error) {
  		for i := int64(0); i < totalShards; i++ {
  			i := i
  			ch <- func() error {
  				result, err := doQueryStat(c, ns, stat, i)
  				if err != nil {
  					return errors.Annotate(err, "while launching index %d: %s", i, result).Err()
  				}
  				logging.Infof(c, "For index %d got %s", i, result)
  				results.add(result)
  				return nil
  			}
  		}
  	}); err != nil {
  		return err
  	}
  
  	// Report
  	stat.metric.Set(c, results.notArchived, ns, "not_archived")
  	stat.metric.Set(c, results.archiveTasked, ns, "archive_tasked")
  	stat.metric.Set(c, results.archivedPartial, ns, "archived_partial")
  	stat.metric.Set(c, results.archivedComplete, ns, "archived_complete")
  	logging.Infof(c, "Stat %s Project %s stat: %s", stat.metric.Info().Name, ns, results)
  	return nil
  }
docs: // doShardedQueryStat launches a batch of queries, at different shard indices.