code: def _load_sentencepiece_tokenizer(
      model_path: str,
      add_bos: bool = False,
      add_eos: bool = True,
      reverse: bool = False,
  ):
      """Load a tf-text SentencePiece tokenizer from given model filepath."""
      with tf.io.gfile.GFile(model_path, "rb") as model_fp:
          sp_model = model_fp.read()
      sp_tokenizer = tftxt.SentencepieceTokenizer(
          model=sp_model,
          add_bos=add_bos,
          add_eos=add_eos,
          reverse=reverse,
      )
      return sp_tokenizer
  
file_path: flax/examples/lm1b/tokenizer.py
imports: import os
  import tempfile
  import time
  from typing import Any, Dict, Iterable, Tuple
  from absl import logging
  import dataclasses
  import jax
  from sentencepiece import SentencePieceTrainer
  import tensorflow
  import tensorflow_text
label_desc: Use image node_id 3 for calling a global function with example usage: _load_sentencepiece_tokenizer(model_path, add_bos, add_eos, reverse) and returns: sp_tokenizer