def update(self, logits: torch.Tensor, targets: torch.Tensor) -> List[float]:
        """
        Update metric value with value for new data
        and return intermediate metrics values.

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

        Returns:
            list of metric@k values
        """
        values = self.metric_function(logits, targets, topk=self.topk)
        values = [v.item() for v in values]
        for value, metric in zip(values, self.metrics):
            metric.update(value, len(targets))
        return values

        Update metric value with value for new data
        and return intermediate metrics values.

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

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