code: def __call__(self, text: str) -> Doc:
      pieces: List[str] = self.tokenizer.EncodeAsPieces(text)  # type: ignore
      if pieces and pieces[0] == self.SPACE_CHAR:
          _tokens = pieces[1:]
      else:
          _tokens = pieces
      tokens = [
          token.replace(self.SPACE_CHAR, " ") for token in _tokens
      ]
      doc = Doc.from_words(tokens)
      self.set_spm_pieces(doc, pieces)
      return doc
  
file_path: camphr/packages/camphr/camphr/tokenizer/sentencepiece/__init__.py
imports: from pathlib import Path
  from camphr.serde import SerDe
  import shutil
  from typing import Any, List, TYPE_CHECKING
  from camphr.doc import DocProto, Doc
label_desc: Use image node_id 4 for calling the Tokenizer obj's underlying member method code with example usage: obj.__call__(text) and returns: doc