def METHOD_NAME(cls, text: str, tkn_cfg: Dict[str, str]):
    sentencepiece_model = tkn_cfg.get("sentencepiece_model", None)
    if sentencepiece_model is not None:
        assert Path(sentencepiece_model).exists()
        import sentencepiece as sp
        spm = sp.SentencePieceProcessor()
        spm.Load(sentencepiece_model)
        return " ".join(spm.Encode(text, out_type=str))
    else:
        return text