class_docstr: Construct a ChatGLM tokenizer. Based on byte-level Byte-Pair-Encoding.
  
  Args:
      vocab_file (`str`):
          Path to the vocabulary file.
class_docstr_tok: ["Construct","a","ChatGLM","tokenizer",".","Based","on","byte-level","Byte-Pair-Encoding",".","Args",":","vocab_file","(","`","str","`",")",":","Path","to","the","vocabulary","file","."]
docstr: Converts a token (str) in an id using the vocab.
docstr_tok: ["Converts","a","token","(","str",")","in","an","id","using","the","vocab","."]
code: def _convert_token_to_id(self, token):
      """Converts a token (str) in an id using the vocab."""
      return self.sp_tokenizer[token]
  
imports: import os
  from typing import Dict, List, Optional, Union
  import numpy
  import sentencepiece
  from transformers.tokenization_utils import PreTrainedTokenizer
  from transformers.tokenization_utils_base import BatchEncoding, EncodedInput
  from transformers.utils import PaddingStrategy, logging
label_desc: Use image node_id 10 for calling the ChatGLMTokenizer obj's underlying member method code with example usage: obj._convert_token_to_id(token) and returns: self