def transform_metadata(self, metric, scraper_config):
    labels = metric.samples[0][self.SAMPLE_LABELS]
    for (metadata_name, label_name) in iteritems(scraper_config['metadata_label_map']):
        if (label_name in labels):
            self.set_metadata(metadata_name, labels[label_name])
def transform_metadata(self, metric, scraper_config):
    labels = metric.samples[0][self.SAMPLE_LABELS]
    for (metadata_name, label_name) in iteritems(scraper_config['metadata_label_map']):
        if (label_name in labels):
            self.set_metadata(metadata_name, labels[label_name])