code: def spm_tokenizer(tmp_path, spm_srcs):
      model, vocabs = spm_srcs
      sp = spm.SentencePieceProcessor()
      sp.load(model)
  
      token_list = tmp_path / "token.list"
      with token_list.open("w") as f:
          for v in vocabs:
              f.write(f"{v}\n")
      return SentencepiecesTokenizer(model=model)
  
file_path: espnet/test/espnet2/text/test_sentencepiece_tokenizer.py
imports: import string
  from pathlib import Path
  import pytest
  import sentencepiece
  from espnet2.text.sentencepiece_tokenizer import SentencepiecesTokenizer
label_desc: Use image node_id 2 for calling a global function with example usage: spm_tokenizer(tmp_path, spm_srcs) and returns: SentencepiecesTokenizer