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.
code: def parse(self, text: str) -> List[int]:
      return self.dict.txt2vec(text, 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 4 for calling the TorchScriptGreedySearch obj's underlying member method code with example usage: obj.parse(text) and returns: self