def preprocess_function(examples):
    args = ((examples[sentence1_key],) if (sentence2_key is None) else (examples[sentence1_key], examples[sentence2_key]))
    result = tokenizer(*args, padding=padding, max_length=max_seq_length, truncation=True)
    if ((label_to_id is not None) and ('label' in examples)):
        result['label'] = [(label_to_id[l] if (l != (- 1)) else (- 1)) for l in examples['label']]
    return result
def preprocess_function(examples):
    args = ((examples[sentence1_key],) if (sentence2_key is None) else (examples[sentence1_key], examples[sentence2_key]))
    result = tokenizer(*args, padding=padding, max_length=max_seq_length, truncation=True)
    if ((label_to_id is not None) and ('label' in examples)):
        result['label'] = [(label_to_id[l] if (l != (- 1)) else (- 1)) for l in examples['label']]
    return result