def __get_parity_result_variable(row, metric, fairness_threshold):
    """ Creates parity test result variable for each provided row, separating the Reference group from the passing ones."""
    if row["attribute_value"] == row["ref_group_value"]:
        return "Reference"
    elif abs(row[f"{metric}_disparity_scaled"]) < fairness_threshold - 1:
        return "Pass"
    else:
        return "Fail"