presto-main/src/main/java/io/prestosql/execution/StageInfo.java/StageInfo/getAllStages
class StageInfo:    public static List<StageInfo> getAllStages(Optional<StageInfo> stageInfo)
    {
        ImmutableList.Builder<StageInfo> collector = ImmutableList.builder();
        addAllStages(stageInfo, collector);
        return collector.build();
    }