class_docstr: BPE Helper for GPT2 Models.
  
  Original source:
      https://github.com/openai/gpt-2/blob/main/src/encoder.py
  
  Original license: MIT
  
  This is a modified implementation from that of fairseq:
      https://github.com/pytorch/fairseq/blob/main/fairseq/data/encoders/gpt2_bpe_utils.py
  
  Fairseq license: MIT
class_docstr_tok: ["BPE","Helper","for","GPT2","Models",".","Original","source",":","https",":","\/\/github.com\/openai\/gpt-2\/blob\/main\/src\/encoder.py","Original","license",":","MIT","This","is","a","modified","implementation","from","that","of","fairseq",":","https",":","\/\/github.com\/pytorch\/fairseq\/blob\/main\/fairseq\/data\/encoders\/gpt2_bpe_utils.py","Fairseq","license",":","MIT"]
docstr: Decode list of tokens into text string.
  
  :param tokens:
      list of tokens
  :param token_ids:
      list of token ids
  :param delimiter:
      string delimiter for tokens
  
  :return text:
      decoded text
docstr_tok: ["Decode","list","of","tokens","into","text","string",".",":","param","tokens",":","list","of","tokens",":","param","token_ids",":","list","of","token","ids",":","param","delimiter",":","string","delimiter","for","tokens",":","return","text",":","decoded","text"]
code: def helper_decode(
      self, tokens: List[str], token_ids: List[int], delimiter: str
  ) -> str:
      """
      Decode list of tokens into text string.
  
      :param tokens:
          list of tokens
      :param token_ids:
          list of token ids
      :param delimiter:
          string delimiter for tokens
  
      :return text:
          decoded text
      """
      text = "".join([self.decoder[token] for token in tokens])
      text = bytearray([self.byte_decoder[c] for c in text]).decode(
          "utf-8", errors=self.ERRORS_METHOD
      )
      return text
  
imports: from parlai.core.params import ParlaiParser
  from abc import ABC, abstractmethod
  from functools import lru_cache
  import json
  import os
  import random
  import re
  from typing import Dict, List, Optional, Set, Tuple
  from typing_extensions import final
  from parlai.core.build_data import download, make_dir
  from parlai.core.opt import Opt
  from parlai.utils.misc import warn_once
  from parlai.utils.typing import TShared
  from parlai.utils.io import PathManager
  import parlai.utils.logging
label_desc: Use image node_id 9 for calling the Gpt2BpeHelper obj's underlying member method code with example usage: obj.helper_decode(tokens, token_ids, delimiter) and returns: text