class_docstr: Construct a CANINE tokenizer (i.e. a character splitter). It turns text into a sequence of characters, and then
  converts each character into its Unicode code point.
  
  [`CanineTokenizer`] inherits from [`PreTrainedTokenizer`].
  
  Refer to superclass [`PreTrainedTokenizer`] for usage examples and documentation concerning parameters.
  
  Args:
      model_max_length (`int`, *optional*, defaults to 2048):
              The maximum sentence length the model accepts.
class_docstr_tok: ["Construct","a","CANINE","tokenizer","(","i.e",".","a","character","splitter",")",".","It","turns","text","into","a","sequence","of","characters",",","and","then","converts","each","character","into","its","Unicode","code","point",".","[","`","CanineTokenizer","`","]","inherits","from","[","`","PreTrainedTokenizer","`","]",".","Refer","to","superclass","[","`","PreTrainedTokenizer","`","]","for","usage","examples","and","documentation","concerning","parameters",".","Args",":","model_max_length","(","`","int","`",",","*","optional","*",",","defaults","to","2048",")",":","The","maximum","sentence","length","the","model","accepts","."]
docstr: Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
  adding special tokens. A CANINE sequence has the following format:
  
  - single sequence: `[CLS] X [SEP]`
  - pair of sequences: `[CLS] A [SEP] B [SEP]`
  
  Args:
      token_ids_0 (`List[int]`):
          List of IDs to which the special tokens will be added.
      token_ids_1 (`List[int]`, *optional*):
          Optional second list of IDs for sequence pairs.
  
  Returns:
      `List[int]`: List of [input IDs](../glossary#input-ids) with the appropriate special tokens.
docstr_tok: ["Build","model","inputs","from","a","sequence","or","a","pair","of","sequence","for","sequence","classification","tasks","by","concatenating","and","adding","special","tokens",".","A","CANINE","sequence","has","the","following","format",":","-","single","sequence",":","`","[","CLS","]","X","[","SEP","]","`","-","pair","of","sequences",":","`","[","CLS","]","A","[","SEP","]","B","[","SEP","]","`","Args",":","token_ids_0","(","`","List","[","int","]","`",")",":","List","of","IDs","to","which","the","special","tokens","will","be","added",".","token_ids_1","(","`","List","[","int","]","`",",","*","optional","*",")",":","Optional","second","list","of","IDs","for","sequence","pairs",".","Returns",":","`","List","[","int","]","`",":","List","of","[","input","IDs","]","(","..","\/glossary","#","input-ids",")","with","the","appropriate","special","tokens","."]
code: def build_inputs_with_special_tokens(
      self,
      token_ids_0: List[int],
      token_ids_1: Optional[List[int]] = None,
  ) -> List[int]:
      """
      Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
      adding special tokens. A CANINE sequence has the following format:
  
      - single sequence: `[CLS] X [SEP]`
      - pair of sequences: `[CLS] A [SEP] B [SEP]`
  
      Args:
          token_ids_0 (`List[int]`):
              List of IDs to which the special tokens will be added.
          token_ids_1 (`List[int]`, *optional*):
              Optional second list of IDs for sequence pairs.
  
      Returns:
          `List[int]`: List of [input IDs](../glossary#input-ids) with the appropriate special tokens.
      """
      sep = [self.sep_token_id]
      cls = [self.cls_token_id]
  
      result = cls + token_ids_0 + sep
      if token_ids_1 is not None:
          result += token_ids_1 + sep
      return result
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/canine/tokenization_canine.py
imports: from typing import Dict, List, Optional
  from ...tokenization_utils import AddedToken, PreTrainedTokenizer
  from ...utils import logging
label_desc: Use image node_id 7 for calling the CanineTokenizer obj's underlying member method code with example usage: obj.build_inputs_with_special_tokens(token_ids_0, token_ids_1) and returns: result