code: func (a *HorizontalController) stabilizeRecommendation(key string, prenormalizedDesiredReplicas int32) int32 {
  	maxRecommendation := prenormalizedDesiredReplicas
  	foundOldSample := false
  	oldSampleIndex := 0
  	cutoff := time.Now().Add(-a.downscaleStabilisationWindow)
  	for i, rec := range a.recommendations[key] {
  		if rec.timestamp.Before(cutoff) {
  			foundOldSample = true
  			oldSampleIndex = i
  		} else if rec.recommendation > maxRecommendation {
  			maxRecommendation = rec.recommendation
  		}
  	}
  	if foundOldSample {
  		a.recommendations[key][oldSampleIndex] = timestampedRecommendation{prenormalizedDesiredReplicas, time.Now()}
  	} else {
  		a.recommendations[key] = append(a.recommendations[key], timestampedRecommendation{prenormalizedDesiredReplicas, time.Now()})
  	}
  	return maxRecommendation
  }
docs: // stabilizeRecommendation:
  // - replaces old recommendation with the newest recommendation,
  // - returns max of recommendations that are not older than downscaleStabilisationWindow.