class_docstr: Test case for SentencePieceProcessor
class_docstr_tok: ["Test","case","for","SentencePieceProcessor"]
code: def test_load(self):
      self.assertEqual(1000, self.sp_.GetPieceSize())
      self.assertEqual(0, self.sp_.PieceToId("<unk>"))
      self.assertEqual(1, self.sp_.PieceToId("<s>"))
      self.assertEqual(2, self.sp_.PieceToId("</s>"))
      self.assertEqual("<unk>", self.sp_.IdToPiece(0))
      self.assertEqual("<s>", self.sp_.IdToPiece(1))
      self.assertEqual("</s>", self.sp_.IdToPiece(2))
      self.assertEqual(0, self.sp_.unk_id())
      self.assertEqual(1, self.sp_.bos_id())
      self.assertEqual(2, self.sp_.eos_id())
      self.assertEqual(-1, self.sp_.pad_id())
      for i in range(self.sp_.GetPieceSize()):
          piece = self.sp_.IdToPiece(i)
          self.assertEqual(i, self.sp_.PieceToId(piece))
  
      self.assertEqual(1000, self.sp_.get_piece_size())
      self.assertEqual(0, self.sp_.piece_to_id("<unk>"))
      self.assertEqual(1, self.sp_.piece_to_id("<s>"))
      self.assertEqual(2, self.sp_.piece_to_id("</s>"))
      self.assertEqual("<unk>", self.sp_.id_to_piece(0))
      self.assertEqual("<s>", self.sp_.id_to_piece(1))
      self.assertEqual("</s>", self.sp_.id_to_piece(2))
      for i in range(self.sp_.get_piece_size()):
          piece = self.sp_.id_to_piece(i)
          self.assertEqual(i, self.sp_.piece_to_id(piece))
  
imports: from collections import defaultdict
  import io
  import os
  import pickle
  import sys
  import unittest
  import sentencepiece
label_desc: Use image node_id 2 for calling the TestSentencepieceProcessor obj's underlying member method code with example usage: obj.test_load() without return types