docs: public static List<PostAggregator> prepareAggregations(
        List<String> otherOutputNames,
        List<AggregatorFactory> aggFactories,
        List<PostAggregator> postAggs
    )
    {
      Preconditions.checkNotNull(otherOutputNames, "otherOutputNames cannot be null");
      Preconditions.checkNotNull(aggFactories, "aggregations cannot be null");
  
      final Set<String> combinedOutputNames = new HashSet<>();
      combinedOutputNames.addAll(otherOutputNames);
  
      final Map<String, AggregatorFactory> aggsFactoryMap = new HashMap<>();
      for (AggregatorFactory aggFactory : aggFactories) {
        Preconditions.checkArgument(
            combinedOutputNames.add(aggFactory.getName()),
            "[%s] already defined", aggFactory.getName()
        );
        aggsFactoryMap.put(aggFactory.getName(), aggFactory);
      }
  
      if (postAggs != null && !postAggs.isEmpty()) {
        List<PostAggregator> decorated = Lists.newArrayListWithExpectedSize(postAggs.size());
        for (final PostAggregator postAgg : postAggs) {
          final Set<String> dependencies = postAgg.getDependentFields();
          final Set<String> missing = Sets.difference(dependencies, combinedOutputNames);
  
          Preconditions.checkArgument(
              missing.isEmpty(),
              "Missing fields [%s] for postAggregator [%s]", missing, postAgg.getName()
          );
          Preconditions.checkArgument(
              combinedOutputNames.add(postAgg.getName()),
              "[%s] already defined", postAgg.getName()
          );
  
          decorated.add(postAgg.decorate(aggsFactoryMap));
        }
        return decorated;
      }
  
      return postAggs;
    }