class_docstr: Version of parlai.utils.bpe.Gpt2BpeHelper that can be TorchScripted.
class_docstr_tok: ["Version","of","parlai.utils.bpe.Gpt2BpeHelper","that","can","be","TorchScripted","."]
docstr: Decode list of tokens into a text string.
  
  :param tokens:
      list of tokens
  
  :return text:
      decoded text
docstr_tok: ["Decode","list","of","tokens","into","a","text","string",".",":","param","tokens",":","list","of","tokens",":","return","text",":","decoded","text"]
code: def decode(self, tokens: List[str]) -> str:
      """
      Decode list of tokens into a text string.
  
      :param tokens:
          list of tokens
  
      :return text:
          decoded text
      """
      output: List[str] = []
      accum: List[str] = []
      for token in tokens:
          if token in self._special_tokens:
              if len(accum) > 0:
                  output.append(self.helper_decode(accum))
                  accum.clear()
              output.append(token)
          else:
              accum.append(token)
      if len(accum) > 0:
          output.append(self.helper_decode(accum))
  
      text = "".join(output)
      if self.add_prefix_space:
          assert text.startswith(" ")
          text = text.lstrip(" ")
      return text
  
imports: from typing import Dict, List, Tuple
  import torch.jit
label_desc: Use image node_id 7 for calling the ScriptableGpt2BpeHelper obj's underlying member method code with example usage: obj.decode(tokens) and returns: text