def test_accuracy(
    outputs: torch.Tensor,
    targets: torch.Tensor,
    num_classes: int,
    topk: List[int],
    true_values: Dict[str, float],
) -> None:
    """
    Test multiclass accuracy with different topk args
    Note that now `accuracy/std` is not std exactly so it can fail if you fix it.

    Args:
        outputs: tensor of outputs
        targets: tensor of targets
        num_classes: number of classes for classification
        topk: list of topk args for accuracy@topk
        true_values: true metrics values
    """
    metric = AccuracyMetric(topk=topk)
    metric.update(logits=outputs, targets=targets)
    metrics = metric.compute_key_value()
    for key in true_values.keys():
        assert key in metrics
        assert np.isclose(true_values[key], metrics[key])

    Test multiclass accuracy with different topk args
    Note that now `accuracy/std` is not std exactly so it can fail if you fix it.

    Args:
        outputs: tensor of outputs
        targets: tensor of targets
        num_classes: number of classes for classification
        topk: list of topk args for accuracy@topk
        true_values: true metrics values
    
tests/catalyst/metrics/test_accuracy.py