class Builder {

        private final List<MetricSnapshot> snapshots = new ArrayList<>();

        private Builder() {
        }

        public boolean containsMetricName(String name) {<FILL_FUNCTION_BODY>}

        /**
         * Add a metric snapshot. Call multiple times to add multiple metric snapshots.
         */
        public Builder metricSnapshot(MetricSnapshot snapshot) {
            snapshots.add(snapshot);
            return this;
        }

        public MetricSnapshots build() {
            return new MetricSnapshots(snapshots);
        }
    }

            for (MetricSnapshot snapshot : snapshots) {
                if (snapshot.getMetadata().getPrometheusName().equals(prometheusName(name))) {
                    return true;
                }
            }
            return false;
        
<no_super_class>