code: private static Map<Long, Double> fillCalculateMetricTransform(Metric metric, String calculationType) {
          // Calculate min, max, avg, dev, or a percentile value
          Double result = calculateResult(metric, calculationType);
  
          // return a new time series with the constant values for each time stamp
          Map<Long, Double> resultMap = new TreeMap<>();
  
          for (Map.Entry<Long, Double> entry : metric.getDatapoints().entrySet()) {
              Long timestamp = entry.getKey();
  
              resultMap.put(timestamp, result);
          }
          return resultMap;
      }
docs: ~ Methods **************************************************************************************************************************************