class_docstr: Constructs a Ernie-M tokenizer. It uses the `sentencepiece` tools to cut the words to sub-words.
  
  Args:
      sentencepiece_model_file (`str`):
          The file path of sentencepiece model.
      vocab_file (`str`, *optional*):
          The file path of the vocabulary.
      do_lower_case (`str`, *optional*, defaults to `True`):
          Whether or not to lowercase the input when tokenizing.
      unk_token (`str`, *optional*, defaults to `"[UNK]"`):
          A special token representing the `unknown (out-of-vocabulary)` token. An unknown token is set to be
          `unk_token` inorder to be converted to an ID.
      sep_token (`str`, *optional*, defaults to `"[SEP]"`):
          A special token separating two different sentences in the same input.
      pad_token (`str`, *optional*, defaults to `"[PAD]"`):
          A special token used to make arrays of tokens the same size for batching purposes.
      cls_token (`str`, *optional*, defaults to `"[CLS]"`):
          A special token used for sequence classification. It is the last token of the sequence when built with
          special tokens.
      mask_token (`str`, *optional*, defaults to `"[MASK]"`):
          A special token representing a masked token. This is the token used in the masked language modeling task
          which the model tries to predict the original unmasked ones.
class_docstr_tok: ["Constructs","a","Ernie-M","tokenizer",".","It","uses","the","`","sentencepiece","`","tools","to","cut","the","words","to","sub-words",".","Args",":","sentencepiece_model_file","(","`","str","`",")",":","The","file","path","of","sentencepiece","model",".","vocab_file","(","`","str","`",",","*","optional","*",")",":","The","file","path","of","the","vocabulary",".","do_lower_case","(","`","str","`",",","*","optional","*",",","defaults","to","`","True","`",")",":","Whether","or","not","to","lowercase","the","input","when","tokenizing",".","unk_token","(","`","str","`",",","*","optional","*",",","defaults","to","`","``","[","UNK","]","''","`",")",":","A","special","token","representing","the","`","unknown","(","out-of-vocabulary",")","`","token",".","An","unknown","token","is","set","to","be","`","unk_token","`","inorder","to","be","converted","to","an","ID",".","sep_token","(","`","str","`",",","*","optional","*",",","defaults","to","`","``","[","SEP","]","''","`",")",":","A","special","token","separating","two","different","sentences","in","the","same","input",".","pad_token","(","`","str","`",",","*","optional","*",",","defaults","to","`","``","[","PAD","]","''","`",")",":","A","special","token","used","to","make","arrays","of","tokens","the","same","size","for","batching","purposes",".","cls_token","(","`","str","`",",","*","optional","*",",","defaults","to","`","``","[","CLS","]","''","`",")",":","A","special","token","used","for","sequence","classification",".","It","is","the","last","token","of","the","sequence","when","built","with","special","tokens",".","mask_token","(","`","str","`",",","*","optional","*",",","defaults","to","`","``","[","MASK","]","''","`",")",":","A","special","token","representing","a","masked","token",".","This","is","the","token","used","in","the","masked","language","modeling","task","which","the","model","tries","to","predict","the","original","unmasked","ones","."]
docstr: Create the token type IDs corresponding to the sequences passed. [What are token type
  IDs?](../glossary#token-type-ids) Should be overridden in a subclass if the model has a special way of
  building: those.
  
  Args:
      token_ids_0 (`List[int]`):
          The first tokenized sequence.
      token_ids_1 (`List[int]`, *optional*):
          The second tokenized sequence.
  Returns:
      `List[int]`: The token type ids.
docstr_tok: ["Create","the","token","type","IDs","corresponding","to","the","sequences","passed",".","[","What","are","token","type","IDs","?","]","(","..","\/glossary","#","token-type-ids",")","Should","be","overridden","in","a","subclass","if","the","model","has","a","special","way","of","building",":","those",".","Args",":","token_ids_0","(","`","List","[","int","]","`",")",":","The","first","tokenized","sequence",".","token_ids_1","(","`","List","[","int","]","`",",","*","optional","*",")",":","The","second","tokenized","sequence",".","Returns",":","`","List","[","int","]","`",":","The","token","type","ids","."]
code: def create_token_type_ids_from_sequences(
      self,
      token_ids_0: List[int],
      token_ids_1: Optional[List[int]] = None,
  ) -> List[int]:
      """
      Create the token type IDs corresponding to the sequences passed. [What are token type
      IDs?](../glossary#token-type-ids) Should be overridden in a subclass if the model has a special way of
      building: those.
  
      Args:
          token_ids_0 (`List[int]`):
              The first tokenized sequence.
          token_ids_1 (`List[int]`, *optional*):
              The second tokenized sequence.
      Returns:
          `List[int]`: The token type ids.
      """
      # called when `add_special_tokens` is True, so align with `build_inputs_with_special_tokens` method
      if token_ids_1 is None:
          # [CLS] X [SEP]
          return (len(token_ids_0) + 2) * [0]
  
      # [CLS] A [SEP] [SEP] B [SEP]
      return [0] * (len(token_ids_0) + 1) + [1] * (len(token_ids_1) + 3)
  
imports: import io
  import os
  import unicodedata
  from typing import Any, Dict, List, Optional, Tuple
  import sentencepiece
  from ...tokenization_utils import PreTrainedTokenizer
  from ...utils import logging
label_desc: Use image node_id 16 for calling the ErnieMTokenizer obj's underlying member method code with example usage: obj.create_token_type_ids_from_sequences(token_ids_0, token_ids_1) and returns: unknown, unknown