def METHOD_NAME(examples):
    # Tokenize the texts
    texts = (
        (examples[sentence1_key],) if sentence2_key is None else (examples[sentence1_key], examples[sentence2_key])
    )
    result = tokenizer(*texts, max_length=model_args.max_seq_length, truncation=True)
    if "label" in examples:
        # In all cases, rename the column to labels because the model will expect that.
        result["labels"] = examples["label"]
    return result