def update_key_value(
        self, logits: torch.Tensor, targets: torch.Tensor
    ) -> Dict[str, float]:
        """
        Update metric value with value for new data and return intermediate metrics
        values in key-value format.

        Args:
            logits (torch.Tensor): tensor of logits
            targets (torch.Tensor): tensor of targets

        Returns:
            dict of metric@k values
        """
        values = self.update(logits=logits, targets=targets)
        output = {
            f"{self.prefix}{self.metric_name}{key:02d}{self.suffix}": value
            for key, value in zip(self.topk, values)
        }
        return output

        Update metric value with value for new data and return intermediate metrics
        values in key-value format.

        Args:
            logits (torch.Tensor): tensor of logits
            targets (torch.Tensor): tensor of targets

        Returns:
            dict of metric@k values
        
catalyst/metrics/_topk_metric.py