code: def add_parser(subparsers, parent_parser):
      CHECKOUT_HELP = "Checkout data files from cache."
  
      checkout_parser = subparsers.add_parser(
          "checkout",
          parents=[parent_parser],
          description=append_doc_link(CHECKOUT_HELP, "checkout"),
          help=CHECKOUT_HELP,
          formatter_class=formatter.RawDescriptionHelpFormatter,
      )
      checkout_parser.add_argument(
          "--summary",
          action="store_true",
          default=False,
          help="Show summary of the changes.",
      )
      checkout_parser.add_argument(
          "-d",
          "--with-deps",
          action="store_true",
          default=False,
          help="Checkout all dependencies of the specified target.",
      )
      checkout_parser.add_argument(
          "-R",
          "--recursive",
          action="store_true",
          default=False,
          help="Checkout all subdirectories of the specified directory.",
      )
      checkout_parser.add_argument(
          "-f",
          "--force",
          action="store_true",
          default=False,
          help="Do not prompt when removing working directory files.",
      )
      checkout_parser.add_argument(
          "--relink",
          action="store_true",
          default=False,
          help="Recreate links or copies from cache to workspace.",
      )
      checkout_parser.add_argument(
          "--allow-missing",
          action="store_true",
          default=False,
          help="Ignore errors if some of the files or directories are missing.",
      )
      checkout_parser.add_argument(
          "targets",
          nargs="*",
          help=(
              "Limit command scope to these tracked files/directories, "
              ".dvc files and stage names."
          ),
      ).complete = completion.DVC_FILE
      checkout_parser.set_defaults(func=CmdCheckout)
  
file_path: dvc/dvc/commands/checkout.py
imports: import operator
  from dvc.cli import completion, formatter
  from dvc.cli.command import CmdBase
  from dvc.cli.utils import append_doc_link
  from dvc.exceptions import CheckoutError
  from dvc.ui import ui
label_desc: Use image node_id 2 for calling a global function with example usage: add_parser(subparsers, parent_parser) without return types