class_docstr: Test case for SentencePieceProcessor
class_docstr_tok: ["Test","case","for","SentencePieceProcessor"]
code: def test_new_api_init(self):
      sp = spm.SentencePieceProcessor(
          model_file=os.path.join("test", "test_model.model"),
          add_bos=True,
          add_eos=True,
          out_type=str,
      )
      text = "hello world"
      pieces = ["<s>"] + self.sp_.EncodeAsPieces(text) + ["</s>"]
      self.assertEqual(pieces, sp.encode(text))
  
      pieces = self.sp_.EncodeAsPieces(text) + ["</s>"]
      self.assertEqual(
          pieces, sp.encode(text, add_bos=False, add_eos=True)
      )
  
imports: from collections import defaultdict
  import io
  import os
  import pickle
  import sys
  import unittest
  import sentencepiece
label_desc: Use image node_id 12 for calling the TestSentencepieceProcessor obj's underlying member method code with example usage: obj.test_new_api_init() without return types