code: def load_spm(
      path: str, sp_model_kwargs: Dict[str, Any]
  ) -> sentencepiece.SentencePieceProcessor:
      spm = sentencepiece.SentencePieceProcessor(**sp_model_kwargs)
      spm.Load(str(path))
      return spm
  
imports: import json
  import os
  from pathlib import Path
  from shutil import copyfile
  from typing import Any, Dict, List, Optional, Tuple, Union
  import sentencepiece
  from ...tokenization_utils import BatchEncoding, PreTrainedTokenizer
  from ...utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: load_spm(path, sp_model_kwargs) and returns: spm