def METHOD_NAME(example, tokenizer, max_seq_len=512, return_length=True):
    """Convert all examples into necessary features."""
    source = example
    tokenized_example = tokenizer.gen_encode(
        source,
        max_seq_len=max_seq_len,
        add_start_token_for_decoding=True,
        return_length=True,
        is_split_into_words=False,
    )
    return tokenized_example