def METHOD_NAME(self, raw_metric_name):
    dd_name = JMX_METRICS_MAP[raw_metric_name]
    def transform(_metric, sample_data, _runtime_data):
        for sample, tags, hostname in sample_data:
            self._submit_both_gauge_and_count(dd_name, sample.value, tags=tags, hostname=hostname)
    return transform