code: def __init__(
      self, model: Union[Path, str], encode_kwargs: Dict = dict()
  ):
      assert check_argument_types()
      self.model = str(model)
      # NOTE(kamo):
      # Don't build SentencePieceProcessor in __init__()
      # because it's not picklable and it may cause following error,
      # "TypeError: can't pickle SwigPyObject objects",
      # when giving it as argument of "multiprocessing.Process()".
      self.sp = None
      self.encode_kwargs = encode_kwargs
  
file_path: espnet/espnet2/text/sentencepiece_tokenizer.py
imports: from pathlib import Path
  from typing import Dict, Iterable, List, Union
  import sentencepiece
  from typeguard import check_argument_types
  from espnet2.text.abs_tokenizer import AbsTokenizer
label_desc: Use image node_id 1 to create a new SentencepiecesTokenizer object from inherited base classes: AbsTokenizer with example: obj = SentencepiecesTokenizer(model, encode_kwargs)