code: private Map<String, Double> getMinMax(Map<Long, Double> metricData) {
          double min = 0.0;
          double max = 0.0;
          boolean isMinMaxSet = false;
          for (Double value : metricData.values()) {
              double valueDouble = value;
              if (!isMinMaxSet) {
                  min = valueDouble;
                  max = valueDouble;
                  isMinMaxSet = true;
              } else {
                  if (valueDouble < min) {
                      min = valueDouble;
                  } else if (valueDouble > max) {
                      max = valueDouble;
                  }
              }
          }
  
          Map<String, Double> minMax = new HashMap<>();
          minMax.put("min", min);
          minMax.put("max", max);
          return minMax;
      }
docs: Identifies the min and max values of a metric
  
  @param metricData Metric to find the min and max values of
  @return Map containing the min and max values of the metric