def test_accuracy_update(
    outputs_list: List[torch.Tensor],
    targets_list: List[torch.Tensor],
    num_classes: int,
    topk: List[int],
    true_values_list: List[Dict[str, float]],
) -> None:
    """
    This test checks that AccuracyMetric updates its values correctly and return
    correct intermediate results
    Note that now `accuracy/std` is not std exactly so it can fail if you fix it.

    Args:
        outputs_list: list of output tensors
        targets_list: list of target tensors
        num_classes: number od classes for classification
        topk: topk args for computing accuracy@topk
        true_values_list: list of correct metrics intermediate values
    """
    metric = AccuracyMetric(topk=topk, num_classes=num_classes)
    for outputs, targets, true_values in zip(
        outputs_list, targets_list, true_values_list
    ):
        metric.update(logits=outputs, targets=targets)
        intermediate_metric_values = metric.compute_key_value()
        for key in true_values.keys():
            assert key in intermediate_metric_values
            assert np.isclose(true_values[key], intermediate_metric_values[key])

    This test checks that AccuracyMetric updates its values correctly and return
    correct intermediate results
    Note that now `accuracy/std` is not std exactly so it can fail if you fix it.

    Args:
        outputs_list: list of output tensors
        targets_list: list of target tensors
        num_classes: number od classes for classification
        topk: topk args for computing accuracy@topk
        true_values_list: list of correct metrics intermediate values
    
tests/catalyst/metrics/test_accuracy.py