class_docstr: Adapted from [`CamembertTokenizer`] and [`BartTokenizer`]. Construct a "fast" BARThez tokenizer. Based on
  [SentencePiece](https://github.com/google/sentencepiece).
  
  This tokenizer inherits from [`PreTrainedTokenizerFast`] which contains most of the main methods. Users should
  refer to this superclass for more information regarding those methods.
  
  Args:
      vocab_file (`str`):
          [SentencePiece](https://github.com/google/sentencepiece) file (generally has a *.spm* extension) that
          contains the vocabulary necessary to instantiate a tokenizer.
      bos_token (`str`, *optional*, defaults to `"<s>"`):
          The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.
  
          <Tip>
  
          When building a sequence using special tokens, this is not the token that is used for the beginning of
          sequence. The token used is the `cls_token`.
  
          </Tip>
  
      eos_token (`str`, *optional*, defaults to `"</s>"`):
          The end of sequence token.
  
          <Tip>
  
          When building a sequence using special tokens, this is not the token that is used for the end of sequence.
          The token used is the `sep_token`.
  
          </Tip>
  
      sep_token (`str`, *optional*, defaults to `"</s>"`):
          The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
          sequence classification or for a text and a question for question answering. It is also used as the last
          token of a sequence built with special tokens.
      cls_token (`str`, *optional*, defaults to `"<s>"`):
          The classifier token which is used when doing sequence classification (classification of the whole sequence
          instead of per-token classification). It is the first token of the sequence when built with special tokens.
      unk_token (`str`, *optional*, defaults to `"<unk>"`):
          The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
          token instead.
      pad_token (`str`, *optional*, defaults to `"<pad>"`):
          The token used for padding, for example when batching sequences of different lengths.
      mask_token (`str`, *optional*, defaults to `"<mask>"`):
          The token used for masking values. This is the token used when training this model with masked language
          modeling. This is the token which the model will try to predict.
      additional_special_tokens (`List[str]`, *optional*, defaults to `["<s>NOTUSED", "</s>NOTUSED"]`):
          Additional special tokens used by the tokenizer.
docstr: Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
  adding special tokens. A BARThez sequence has the following format:
  
  - single sequence: `<s> X </s>`
  - pair of sequences: `<s> A </s></s> B </s>`
  
  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 BARThez sequence has the following format:
  
      - single sequence: `<s> X </s>`
      - pair of sequences: `<s> A </s></s> B </s>`
  
      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.
      """
  
      if token_ids_1 is None:
          return [self.cls_token_id] + token_ids_0 + [self.sep_token_id]
      cls = [self.cls_token_id]
      sep = [self.sep_token_id]
      return cls + token_ids_0 + sep + sep + token_ids_1 + sep
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/barthez/tokenization_barthez_fast.py
imports: import os
  from shutil import copyfile
  from typing import List, Optional, Tuple
  from ...tokenization_utils import AddedToken
  from ...tokenization_utils_fast import PreTrainedTokenizerFast
  from ...utils import is_sentencepiece_available, logging
label_desc: Use image node_id 2 for calling the BarthezTokenizerFast obj's underlying member method code with example usage: obj.build_inputs_with_special_tokens(token_ids_0, token_ids_1) and returns: unknown, unknown