def has_best_match(sorted_results):
    if len(sorted_results) <= 1:
        return True

    return sorted_results[0][1] > ABS_THRESHOLD and \
        (sorted_results[0][1] - sorted_results[1][1]) > RELATIVE_THRESHOLD
dataset/ETHPy150Open bartdag/recodoc2/recodoc2/apps/doc/parser/doc_diff.py/has_best_match/original