code: def general_lr_sch_args(
      parser: argparse.ArgumentParser,
  ) -> argparse.ArgumentParser:
      group = parser.add_argument_group(
          title="LR scheduler arguments",
          description="LR scheduler arguments",
      )
  
      group.add_argument(
          "--scheduler.name",
          type=str,
          default="cosine",
          help="LR scheduler name",
      )
      group.add_argument(
          "--scheduler.lr",
          type=float,
          default=0.1,
          help="Learning rate",
      )
      group.add_argument(
          "--scheduler.max-epochs",
          type=int,
          default=None,
          help="Max. epochs for training",
      )
      group.add_argument(
          "--scheduler.max-iterations",
          type=int,
          default=None,
          help="Max. iterations for training",
      )
      group.add_argument(
          "--scheduler.warmup-iterations",
          type=int,
          default=None,
          help="Warm-up iterations",
      )
      group.add_argument(
          "--scheduler.warmup-init-lr",
          type=float,
          default=1e-7,
          help="Warm-up init lr",
      )
      group.add_argument(
          "--scheduler.is-iteration-based",
          action="store_true",
          help="Is iteration type or epoch type",
      )
  
      group.add_argument(
          "--scheduler.adjust-period-for-epochs",
          action="store_true",
          help="Adjust the period for epoch-based scheduler.",
      )
  
      return parser
  
imports: import argparse
  from optim.scheduler.base_scheduler import BaseLRScheduler
  from utils import logger
  from utils.registry import Registry
label_desc: Use image node_id 2 for calling a global function with example usage: general_lr_sch_args(parser) and returns: parser