def test_precision(tp: int, fp: int, zero_division: int, true_value: float):
    """
    Test precision metric

    Args:
        tp: true positive statistic
        fp: false positive statistic
        zero_division: 0 or 1, value to return in case of zero division
        true_value: true metric value
    """
    precision_value = precision(tp=tp, fp=fp, zero_division=zero_division)
    assert (precision_value - true_value) < EPS

    Test precision metric

    Args:
        tp: true positive statistic
        fp: false positive statistic
        zero_division: 0 or 1, value to return in case of zero division
        true_value: true metric value
    
tests/catalyst/metrics/functional/test_classification.py