<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def kube_pod_status_phase(self, metric, scraper_config):
 """ Phase a pod is in. """

        metric_name = scraper_config['namespace'] + '.pod.status_phase'
        status_phase_counter = Counter()

        for sample in metric.samples:
            # Counts aggregated cluster-wide to avoid no-data issues on pod churn,
            # pod granularity available in the service checks
            tags = [
                self._label_to_tag('namespace', sample[self.SAMPLE_LABELS], scraper_config),
                self._label_to_tag('phase', sample[self.SAMPLE_LABELS], scraper_config),
            ] + scraper_config['custom_tags']
            status_phase_counter[tuple(sorted(tags))] += sample[self.SAMPLE_VALUE]

        for tags, count in iteritems(status_phase_counter):
            self.gauge(metric_name, count, tags=list(tags))