code: @Override
      public List<Metric> transform(QueryContext context, List<Metric> metrics) {
          if (metrics == null) {
              throw new MissingDataException("The metrics list cannot be null or empty while performing arithmetic transformations.");
          }
  
          List<Metric> resultMetrics = new ArrayList<>();
  
          if (metrics.isEmpty()) {
              return resultMetrics;
          }
  
          Metric result = new Metric(getResultScopeName(), RESULT_METRIC_NAME);
          Map<Long, Double> resultDatapoints = new HashMap<>();
  
          for (Metric metric : metrics) {
              Iterator<Entry<Long, Double>> it = metric.getDatapoints().entrySet().iterator();
  
              while (it.hasNext()) {
                  Entry<Long, Double> entry = it.next();
  
                  if (resultDatapoints.containsKey(entry.getKey())) {
                      resultDatapoints.put(entry.getKey(), performOperation(resultDatapoints.get(entry.getKey()), entry.getValue()));
                  } else {
                      resultDatapoints.put(entry.getKey(), entry.getValue());
                  }
              }
          }
          result.setDatapoints(resultDatapoints);
          MetricDistiller.setCommonAttributes(metrics, result);
          Collections.addAll(resultMetrics, result);
          return resultMetrics;
      }
docs: ~ Methods **************************************************************************************************************************************