code: def _add_regularization_args(parser):
      group = parser.add_argument_group(title="regularization")
  
      group.add_argument(
          "--attention-dropout",
          type=float,
          default=0.1,
          help="Post attention dropout probability.",
      )
      group.add_argument(
          "--hidden-dropout",
          type=float,
          default=0.1,
          help="Dropout probability for hidden state transformer.",
      )
      group.add_argument(
          "--weight-decay",
          type=float,
          default=0.01,
          help="Weight decay coefficient for L2 regularization.",
      )
      group.add_argument(
          "--start-weight-decay",
          type=float,
          help="Initial weight decay coefficient for L2 regularization.",
      )
      group.add_argument(
          "--end-weight-decay",
          type=float,
          help="End of run weight decay coefficient for L2 regularization.",
      )
      group.add_argument(
          "--weight-decay-incr-style",
          type=str,
          default="constant",
          choices=["constant", "linear", "cosine"],
          help="Weight decay increment function.",
      )
      group.add_argument(
          "--clip-grad",
          type=float,
          default=1.0,
          help="Gradient clipping based on global L2 norm.",
      )
      group.add_argument(
          "--adam-beta1",
          type=float,
          default=0.9,
          help="First coefficient for computing running averages "
          "of gradient and its square",
      )
      group.add_argument(
          "--adam-beta2",
          type=float,
          default=0.999,
          help="Second coefficient for computing running averages "
          "of gradient and its square",
      )
      group.add_argument(
          "--adam-eps",
          type=float,
          default=1e-08,
          help="Term added to the denominator to improve"
          "numerical stability",
      )
      group.add_argument(
          "--sgd-momentum",
          type=float,
          default=0.9,
          help="Momentum factor for sgd",
      )
      return parser
  
imports: import argparse
  import dataclasses
  import json
  import os
  import torch
  import types
  import torch.nn.functional
  from megatron.global_vars import set_retro_args, get_retro_args
  from tools.retro.utils import get_args_path
  from megatron.core.models.retro import RetroConfig
  from megatron.core.transformer import TransformerConfig
label_desc: Use image node_id 11 for calling a global function with example usage: _add_regularization_args(parser) and returns: parser