def _summary_convert_values(self, metric_name, converter):

    def _convert(metric, scraper_config=None):
        for (index, sample) in enumerate(metric.samples):
            val = sample[self.SAMPLE_VALUE]
            if (not self._is_value_valid(val)):
                self.log.debug('Metric value is not supported for metric %s', sample[self.SAMPLE_NAME])
                continue
            if sample[self.SAMPLE_NAME].endswith('_count'):
                continue
            else:
                lst = list(sample)
                lst[self.SAMPLE_VALUE] = converter(val)
                metric.samples[index] = tuple(lst)
        self.submit_openmetric(metric_name, metric, scraper_config)
    return _convert
def _summary_convert_values(self, metric_name, converter):

    def _convert(metric, scraper_config=None):
        for (index, sample) in enumerate(metric.samples):
            val = sample[self.SAMPLE_VALUE]
            if (not self._is_value_valid(val)):
                self.log.debug('Metric value is not supported for metric %s', sample[self.SAMPLE_NAME])
                continue
            if sample[self.SAMPLE_NAME].endswith('_count'):
                continue
            else:
                lst = list(sample)
                lst[self.SAMPLE_VALUE] = converter(val)
                metric.samples[index] = tuple(lst)
        self.submit_openmetric(metric_name, metric, scraper_config)
    return _convert