class_docstr: A helper class for exporting simple greedy-search models via TorchScript.
  
  Models with extra inputs will need to override to include more variables.
docstr: Convert token indices to string of tokens.
docstr_tok: ["Convert","token","indices","to","string","of","tokens","."]
code: def _v2t(self, vec: List[int]) -> str:
      """
      Convert token indices to string of tokens.
      """
      new_vec: List[int] = []
      for i in vec:
          if i == self.end_idx:
              break
          elif i != self.start_idx:
              new_vec.append(i)
      return self.dict.vec2txt(new_vec, dict_tokenizer="gpt2")
  
imports: from collections import defaultdict
  from typing import Dict, List, Optional, Tuple
  import torch.jit
  from parlai.agents.bart.bart import BartAgent
  from parlai.core.dict import DictionaryAgent
  from parlai.core.torch_agent import TorchAgent
  from parlai.utils.bpe import Gpt2BpeHelper, SubwordBPEHelper
  from parlai.torchscript.tokenizer import ScriptableDictionaryAgent
  from torch import nn
label_desc: Use image node_id 5 for calling the TorchScriptGreedySearch obj's underlying member method code with example usage: obj._v2t(vec) and returns: self