def dedupeSamplePredicate(subsample_size, predicate, items) :

    sample = []
    block_dict = {}
    predicate_function = predicate.func
    field = predicate.field

    for pivot, (index, record) in enumerate(items) :
        column = record[field]
        if not column :
            continue

        if pivot == 10000:
            if 10 < len(block_dict) + len(sample) :
                return sample

        
        block_keys = predicate_function(column)
        
        for block_key in block_keys:
            if block_key not in block_dict :
                block_dict[block_key] = index
            else :
                pair = sort_pair(block_dict.pop(block_key), index)
                sample.append(pair)
                subsample_size -= 1

                if subsample_size :
                    break
                else :
                    return sample

    else :
        return sample
dataset/ETHPy150Open datamade/dedupe/dedupe/sampling.py/dedupeSamplePredicate/swapped operands of `<`