def compute_key_value(self) -> Dict[str, torch.Tensor]:
        """
        Compute segmentation metric for all data and return results in key-value format

        Returns:
             dict of metrics, including micro, macro
                and weighted (if weights were given) metrics
        """
        per_class, micro_metric, macro_metric, weighted_metric = self.compute()

        metrics = {}
        for class_idx, value in enumerate(per_class):
            class_name = self.class_names[class_idx]
            metrics[f"{self.prefix}{self.metric_name}{self.suffix}/{class_name}"] = value

        metrics[f"{self.prefix}{self.metric_name}{self.suffix}/_micro"] = micro_metric
        metrics[f"{self.prefix}{self.metric_name}{self.suffix}"] = macro_metric
        metrics[f"{self.prefix}{self.metric_name}{self.suffix}/_macro"] = macro_metric
        if self.weights is not None:
            # @TODO: rename this one
            metrics[
                f"{self.prefix}{self.metric_name}{self.suffix}/_weighted"
            ] = weighted_metric
        return metrics

        Compute segmentation metric for all data and return results in key-value format

        Returns:
             dict of metrics, including micro, macro
                and weighted (if weights were given) metrics
        
catalyst/metrics/_segmentation.py