code: def __init__(self, model_path: str):
      # reload tokenizer
      from sentencepiece import SentencePieceProcessor
  
      self.sp_model = SentencePieceProcessor(
          model_file=model_path
      )  # pyre-ignore[28]
      logger.info(f"Reloaded SentencePiece model from {model_path}")
  
      # BOS / EOS token IDs
      self.n_words: int = self.sp_model.vocab_size()
      self.bos_id: int = self.sp_model.bos_id()
      self.eos_id: int = self.sp_model.eos_id()
      self.pad_id: int = self.sp_model.pad_id()
      logger.info(
          f"#words: {self.n_words} - BOS ID: {self.bos_id} - EOS ID: {self.eos_id}"
      )
      assert (
          self.sp_model.vocab_size()
          == self.sp_model.get_piece_size()  # pyre-ignore[16]
      )
  
imports: from logging import getLogger
  from typing import List
label_desc: Use image node_id 1 to create a new Tokenizer object  with example: obj = Tokenizer(model_path)