class_docstr: Abstract class of monotonic attentions
class_docstr_tok: ["Abstract","class","of","monotonic","attentions"]
code: def add_args(parser):
      # fmt: off
          parser.add_argument('--no-mass-preservation', action="store_false",
                              dest="mass_preservation",
                              help='Do not stay on the last token when decoding')
          parser.add_argument('--mass-preservation', action="store_true",
                              dest="mass_preservation",
                              help='Stay on the last token when decoding')
          parser.set_defaults(mass_preservation=True)
          parser.add_argument('--noise-var', type=float, default=1.0,
                              help='Variance of discretness noise')
          parser.add_argument('--noise-mean', type=float, default=0.0,
                              help='Mean of discretness noise')
          parser.add_argument('--noise-type', type=str, default="flat",
                              help='Type of discretness noise')
          parser.add_argument('--energy-bias', action="store_true",
                              default=False,
                              help='Bias for energy')
          parser.add_argument('--energy-bias-init', type=float, default=-2.0,
                              help='Initial value of the bias for energy')
          parser.add_argument('--attention-eps', type=float, default=1e-6,
                              help='Epsilon when calculating expected attention')
  
imports: import math
  import torch
  from torch import Tensor
  import torch.nn
  from examples.simultaneous_translation.utils.p_choose_strategy import learnable_p_choose, waitk_p_choose
  from examples.simultaneous_translation.utils.monotonic_attention import expected_alignment_from_p_choose, expected_soft_attention, mass_preservation
  from fairseq.modules import MultiheadAttention
  from .None import register_monotonic_attention
  from typing import Dict, Optional
label_desc: Use image node_id 2 for calling the MonotonicAttention obj's underlying member method code with example usage: obj.add_args(parser) without return types