class_docstr: A polyencoder agent where the model returns attention weights, rather than encoded
  context.
class_docstr_tok: ["A","polyencoder","agent","where","the","model","returns","attention","weights",",","rather","than","encoded","context","."]
code: def add_cmdline_args(
      cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
  ) -> ParlaiParser:
      BasePolyencoderAgent.add_cmdline_args(parser, partial_opt)
      group = parser.add_argument_group("Return Weights Poly Group")
      group.add_argument(
          "--top-k",
          type=int,
          default=100,
          help="How many tokens to output when outputting relevant tokens",
      )
      return parser
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from typing import Optional, Tuple, Dict, Union
  from parlai.agents.transformer.modules import MultiHeadAttention, TransformerEncoder, TransformerEncoderLayer
  from parlai.agents.transformer.polyencoder import PolyencoderAgent, PolyEncoderModule, PolyBasicAttention
  from parlai.core.dict import DictionaryAgent
  from parlai.core.loader import register_agent
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.core.torch_agent import Batch
  from parlai.utils.torch import PipelineHelper
label_desc: Use image node_id 1 for calling the PolyencoderReturnCodeWeightsAgent obj's underlying member method code with example usage: obj.add_cmdline_args(cls, parser, partial_opt) and returns: parser