def compute_agreement_score(num_matches, num1, num2):
    """
    Agreement score is used as a criteria to match unit1 and unit2.
    """
    denom = num1 + num2 - num_matches
    if denom == 0:
        return 0
    return num_matches / denom
Agreement score is used as a criteria to match unit1 and unit2.