def test_multilabel_accuracy(
    outputs: torch.Tensor,
    targets: torch.Tensor,
    threshold: Union[float, torch.Tensor],
    true_value: float,
):
    """
    Test multilabel accuracy with single and multiple thresholds

    Args:
        outputs: tensor of outputs
        targets: tensor of true answers
        threshold: thresholds for multilabel classification
        true_value: expected metric value
    """
    value = multilabel_accuracy(
        outputs=outputs, targets=targets, threshold=threshold
    ).item()
    assert np.isclose(value, true_value)

    Test multilabel accuracy with single and multiple thresholds

    Args:
        outputs: tensor of outputs
        targets: tensor of true answers
        threshold: thresholds for multilabel classification
        true_value: expected metric value
    
tests/catalyst/metrics/functional/test_accuracy.py