code: def expand_checkpointing_args(group):
      """Expands the checkpointing related arguments with pytorch_translate
      specific arguments"""
      group.add_argument(
          "--auto-clear-checkpoints",
          type=utils.bool_flag,
          nargs="?",
          const=True,
          default=True,
          help=(
              "If True, we keep only the last --num-avg-checkpoints checkpoints "
              "on disk and delete all older checkpoints."
          ),
      )
      group.add_argument(
          "--num-avg-checkpoints",
          default=1,
          type=int,
          metavar="N",
          help=(
              "Average over the last N checkpoints when saving "
              "averaged checkpoints and when doing BLEU eval. Must be >=1."
          ),
      )
      group.add_argument(
          "--pretrained-checkpoint-file",
          default="",
          type=str,
          metavar="FILE",
          help=(
              "Allows the user to resume or fine-tune training (possibly with "
              "different parameter) from another run's checkpoint. Note that "
              "if there's already an existing checkpoint at "
              "os.path.join(--save-dir, --restore-file), this "
              "flag will have no effect. We prefer using --save-dir over this "
              "flag to ensure that if user resumes training on a model that "
              "was originaly initialized from another run's checkpoint, we won't "
              "wipe out all progress in --save-dir by re-loading the previous "
              "run's checkpoint."
          ),
      )
      group.add_argument(
          "--load-pretrained-checkpoint-state",
          type=utils.bool_flag,
          nargs="?",
          const=True,
          default=False,
          help=(
              "Whether to also load optimizer extra_state (epoch, "
              "training time, etc) when loading from --pretrained-checkpoint-file. "
              "If false, only model weights are loaded from that file. "
              "Note that this has no effect when restoring from --restore-file."
          ),
      )
  
      return group
  
file_path: translate/pytorch_translate/options.py
imports: import os
  import torch
  from fairseq.data.indexed_dataset import get_available_dataset_impl
  from pytorch_translate import constants, utils
label_desc: Use image node_id 6 for calling a global function with example usage: expand_checkpointing_args(group) and returns: group