class_docstr: Swapping out Encoder:
class_docstr_tok: ["Swapping","out","Encoder",":"]
code: def build_model(self, states=None):
      wrapped_class = TransformerGeneratorModel.with_components(
          encoder=ShiftInvariantEncoder, decoder=TransformerDecoder
      )
      return wrapped_class(self.opt, self.dict)
  
file_path: ParlAI/projects/msc/agents/long_tga.py
imports: import torch
  from typing import Optional, Tuple
  from parlai.agents.transformer.modules import TransformerDecoder, TransformerEncoder, TransformerGeneratorModel
  from parlai.agents.transformer.transformer import TransformerGeneratorAgent
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
label_desc: Use image node_id 2 for calling the TransformerVariantAgent obj's underlying member method code with example usage: obj.build_model(states) and returns: wrapped_class