def METHOD_NAME(example, tokenizer, max_seq_length=512, is_test=False, language="en"):
    if language == "ch":
        q_name = "query"
        t_name = "title"
        l_name = "label"
    else:
        q_name = "sentence1"
        t_name = "sentence2"
        l_name = "labels"
    query, title = example[q_name], example[t_name]
    encoded_inputs = tokenizer(text=query, text_pair=title, max_seq_len=max_seq_length)
    input_ids = encoded_inputs["input_ids"]
    token_type_ids = encoded_inputs["token_type_ids"]
    if not is_test:
        label = np.array([example[l_name]], dtype="int64")
        return input_ids, token_type_ids, label
    else:
        return input_ids, token_type_ids