presto-main/src/main/java/io/prestosql/sql/planner/planprinter/PlanNodeStatsSummarizer.java/PlanNodeStatsSummarizer/aggregateStageStats
class PlanNodeStatsSummarizer:    public static Map<PlanNodeId, PlanNodeStats> aggregateStageStats(List<StageInfo> stageInfos)
    {
        return aggregateTaskStats(stageInfos.stream()
                .flatMap(s -> s.getTasks().stream())
                .collect(toList()));
    }