code: func sumSeries(series []models.Series, cache map[Req][]models.Series) models.Series {
  	if len(series) == 1 {
  		return series[0]
  	}
  	out := pointSlicePool.Get().([]schema.Point)
  	crossSeriesSum(series, &out)
  	var queryPatts []string
  
  Loop:
  	for _, v := range series {
  		// avoid duplicates
  		for _, qp := range queryPatts {
  			if qp == v.QueryPatt {
  				continue Loop
  			}
  		}
  		queryPatts = append(queryPatts, v.QueryPatt)
  	}
  	name := fmt.Sprintf("sumSeries(%s)", strings.Join(queryPatts, ","))
  	cons, queryCons := summarizeCons(series)
  	sum := models.Series{
  		Target:       name,
  		QueryPatt:    name,
  		Datapoints:   out,
  		Interval:     series[0].Interval,
  		Consolidator: cons,
  		QueryCons:    queryCons,
  		Tags:         map[string]string{"name": name},
  	}
  	cache[Req{}] = append(cache[Req{}], sum)
  	return sum
  }
docs: // sumSeries returns a copy-on-write series that is the sum of the inputs