class_docstr: Override TGA to use a different tree search decoder.
code: def __init__(self, opt: Opt, shared=None):
      super().__init__(opt, shared)
      reranker_class = self.get_partial_only_reranker_class()
      if shared and "classifier" in shared:
          self.classifier = shared["classifier"]
      elif shared and "reranker" in shared:
          self.classifier = shared["reranker"]
      elif hasattr(self, "reranker"):
          self.classifier = self.reranker
      else:
          self.classifier = reranker_class(opt)
      assert opt[
          "beam_block_full_context"
      ], "must set --beam-block-full-context True to use PACER"
  
imports: import random
  import torch
  import torch.nn.functional
  from typing import Optional, Any, Dict, List
  from parlai.agents.rag.retrievers import clean_vec
  from parlai.agents.transformer.transformer import TransformerGeneratorAgent
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.core.torch_generator_agent import TreeSearch, GreedySearch, BeamSearch, DelayedBeamSearch, TopKSampling, NucleusSampling, TSType
  import parlai.utils.logging
  from parlai.utils.torch import neginf
  from projects.light_whoami.agents.rpa_rerank import RPAReranker, RPARerankAgent, LongRPARerankAgent
  from projects.light_whoami.task.utils import extract_characters
  from projects.msc.agents.long_tga import TransformerVariantAgent
  from parlai.agents.reranker.reranker import AbstractReranker
label_desc: Use image node_id 3 to create a new PacerAgentMixin object  with example: obj = PacerAgentMixin(opt, shared)