code: def _add_checkpointing_args(parser):
      group = parser.add_argument_group(title="checkpointing")
  
      group.add_argument(
          "--save",
          type=str,
          default=None,
          help="Output directory to save checkpoints to.",
      )
      group.add_argument(
          "--save-interval",
          type=int,
          default=None,
          help="Number of iterations between checkpoint saves.",
      )
      group.add_argument(
          "--no-save-optim",
          action="store_true",
          default=None,
          help="Do not save current optimizer.",
      )
      group.add_argument(
          "--no-save-rng",
          action="store_true",
          default=None,
          help="Do not save current rng state.",
      )
      group.add_argument(
          "--load",
          type=str,
          default=None,
          help="Directory containing a model checkpoint.",
      )
      group.add_argument(
          "--no-load-optim",
          action="store_true",
          default=None,
          help="Do not load optimizer when loading checkpoint.",
      )
      group.add_argument(
          "--no-load-rng",
          action="store_true",
          default=None,
          help="Do not load rng state when loading checkpoint.",
      )
      group.add_argument(
          "--finetune",
          action="store_true",
          help="Load model for finetuning. Do not load optimizer "
          "or rng state from checkpoint and set iteration to 0. "
          "Assumed when loading a release checkpoint.",
      )
  
      return parser
  
imports: import argparse
  import os
  import torch
label_desc: Use image node_id 11 for calling a global function with example usage: _add_checkpointing_args(parser) and returns: parser