public SampleFamily forEach(List<String> array, Closure<Void> each) {
        if (this == EMPTY) {
            return EMPTY;
        }
        return SampleFamily.build(this.context, Arrays.stream(this.samples).map(sample -> {
            Map<String, String> labels = Maps.newHashMap(sample.getLabels());
            for (String element : array) {
                each.call(element, labels);
            }
            return sample.toBuilder().labels(ImmutableMap.copyOf(labels)).build();
        }).toArray(Sample[]::new));
    }
Following operations are used in DSL
oap-server/analyzer/meter-analyzer/src/main/java/org/apache/skywalking/oap/meter/analyzer/dsl/SampleFamily.java