def test_precision_recall() -> None:
    """Test if the precision recall computation returns the desired value."""
    targets = torch.tensor([0, 0, 1, 0, 1, 1], dtype=torch.int)
    predictions = torch.tensor([12, 13, 14, 15, 16, 17])
    metric = BinaryPrecisionRecallCurve()
    metric.update(predictions, targets)
    _, _, thresholds = metric.compute()
    assert (thresholds == torch.tensor([12, 13, 14, 15, 16, 17])).all()
Test if the precision recall computation returns the desired value.
tests/unit/metrics/test_precision_recall.py