def test_multilabel_accuracy(
    outputs: torch.Tensor,
    targets: torch.Tensor,
    thresholds: Union[float, torch.Tensor],
    true_values: Dict[str, float],
) -> None:
    """
    Test multilabel accuracy metric with single and multiple thresholds.
    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 true answers
        thresholds: thresholds for multilabel classification
        true_values: expected metric value
    """
    metric = MultilabelAccuracyMetric(threshold=thresholds)
    metric.update(outputs=outputs, targets=targets)
    values = metric.compute_key_value()
    for key in true_values.keys():
        assert key in true_values
        assert np.isclose(true_values[key], values[key])

    Test multilabel accuracy metric with single and multiple thresholds.
    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 true answers
        thresholds: thresholds for multilabel classification
        true_values: expected metric value
    
tests/catalyst/metrics/test_accuracy.py