code: def add_cmdline_args(
      cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
  ) -> ParlaiParser:
      super().add_cmdline_args(parser, partial_opt=partial_opt)
      group = parser.add_argument_group("EndToEnd Agent")
      group.add_argument(
          "--knowledge-alpha",
          type=float,
          default=0.95,
          help="Weight on the knowledge-attn loss",
      )
      group.add_argument(
          "--knowledge-truncate",
          type=int,
          default=32,
          help="Knowledge truncation field. Defaults to same as --truncate.",
      )
      group.add_argument(
          "--max-knowledge",
          type=int,
          help="Reduce the amount of negative knowledge at train time.",
      )
      parser.add_argument(
          "--knowledge-alpha",
          type=float,
          default=0.95,
          help="Weight on the knowledge-attn loss",
      )
      return parser
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from itertools import chain
  from functools import lru_cache
  import torch
  import numpy
  from parlai.utils.torch import padded_tensor
  from parlai.utils.misc import round_sigfigs
  from parlai.agents.transformer.transformer import TransformerGeneratorAgent
  from .modules import EndToEndModel
  from parlai.tasks.wizard_of_wikipedia.agents import TOKEN_KNOWLEDGE
label_desc: Use image node_id 7 for calling the EndToEndAgent obj's underlying member method code with example usage: obj.add_cmdline_args(cls, parser, partial_opt) and returns: parser