def METHOD_NAME(df, tokenizer, vocab):
    df["tokens"] = ta_F.bpe_tokenize(tokenizer, df["text"])
    df["tokens"] = df["tokens"].list.slice(stop=254)
    df["tokens"] = ta_F.lookup_indices(vocab, df["tokens"])
    df["tokens"] = ta_F.add_tokens(df["tokens"], [0], begin=True)
    df["tokens"] = ta_F.add_tokens(df["tokens"], [2], begin=False)
    return df