class_docstr: Base class for all slow tokenizers.
  
  Inherits from [`~tokenization_utils_base.PreTrainedTokenizerBase`].
  
  Handle all the shared methods for tokenization and special tokens as well as methods downloading/caching/loading
  pretrained tokenizers as well as adding tokens to the vocabulary.
  
  This class also contain the added tokens in a unified way on top of all tokenizers so we don't have to handle the
  specific vocabulary augmentation methods of the various underlying dictionary structures (BPE, sentencepiece...).
class_docstr_tok: ["Base","class","for","all","slow","tokenizers",".","Inherits","from","[","`","~tokenization_utils_base.PreTrainedTokenizerBase","`","]",".","Handle","all","the","shared","methods","for","tokenization","and","special","tokens","as","well","as","methods","downloading\/caching\/loading","pretrained","tokenizers","as","well","as","adding","tokens","to","the","vocabulary",".","This","class","also","contain","the","added","tokens","in","a","unified","way","on","top","of","all","tokenizers","so","we","do","n't","have","to","handle","the","specific","vocabulary","augmentation","methods","of","the","various","underlying","dictionary","structures","(","BPE",",","sentencepiece","...",")","."]
code: def _decode(
      self,
      token_ids: List[int],
      skip_special_tokens: bool = False,
      clean_up_tokenization_spaces: bool = None,
      spaces_between_special_tokens: bool = True,
      **kwargs,
  ) -> str:
      self._decode_use_source_tokenizer = kwargs.pop(
          "use_source_tokenizer", False
      )
  
      filtered_tokens = self.convert_ids_to_tokens(
          token_ids, skip_special_tokens=skip_special_tokens
      )
      legacy_added_tokens = set(
          self._added_tokens_encoder.keys()
      ) - set(self.all_special_tokens) | {
          token
          for token in self.additional_special_tokens
          if self.convert_tokens_to_ids(token) >= self.vocab_size
      }
      # To avoid mixing byte-level and unicode for byte-level BPT
      # we need to build string separately for added tokens and byte-level tokens
      # cf. https://github.com/huggingface/transformers/issues/1133
      sub_texts = []
      current_sub_text = []
      # TODO @ArthurZ in version 5, special tokens should be handled in convert_tokens_to_string, while _convert_tokens_to_string
      for token in filtered_tokens:
          if skip_special_tokens and token in self.all_special_ids:
              continue
          if token in legacy_added_tokens:
              if current_sub_text:
                  string = self.convert_tokens_to_string(
                      current_sub_text
                  )
                  if len(string) > 0:
                      sub_texts.append(string)
                  current_sub_text = []
              sub_texts.append(token)
          else:
              current_sub_text.append(token)
      if current_sub_text:
          sub_texts.append(
              self.convert_tokens_to_string(current_sub_text)
          )
  
      if spaces_between_special_tokens:
          text = " ".join(sub_texts)
      else:
          text = "".join(sub_texts)
  
      clean_up_tokenization_spaces = (
          clean_up_tokenization_spaces
          if clean_up_tokenization_spaces is not None
          else self.clean_up_tokenization_spaces
      )
      if clean_up_tokenization_spaces:
          clean_text = self.clean_up_tokenization(text)
          return clean_text
      else:
          return text
  
imports: import bisect
  import itertools
  import re
  import unicodedata
  from collections import OrderedDict
  from typing import Any, Dict, List, Optional, Tuple, Union, overload
  from .tokenization_utils_base import ENCODE_KWARGS_DOCSTRING, ENCODE_PLUS_ADDITIONAL_KWARGS_DOCSTRING, INIT_TOKENIZER_DOCSTRING, AddedToken, BatchEncoding, EncodedInput, EncodedInputPair, PreTokenizedInput, PreTokenizedInputPair, PreTrainedTokenizerBase, TextInput, TextInputPair, TruncationStrategy
  from .utils import PaddingStrategy, TensorType, add_end_docstrings, logging
label_desc: Use image node_id 27 for calling the PreTrainedTokenizer obj's underlying member method code with example usage: obj._decode(token_ids, skip_special_tokens, clean_up_tokenization_spaces, spaces_between_special_tokens) and returns: clean_text, text