code: def add_parser(queue_subparsers, parent_parser):
      QUEUE_REMOVE_HELP = (
          "Remove queued and completed tasks from the queue."
      )
      queue_remove_parser = queue_subparsers.add_parser(
          "remove",
          parents=[parent_parser],
          description=append_doc_link(
              QUEUE_REMOVE_HELP, "queue/remove"
          ),
          help=QUEUE_REMOVE_HELP,
          formatter_class=formatter.RawDescriptionHelpFormatter,
      )
      queue_remove_parser.add_argument(
          "--all",
          action="store_true",
          help="Remove all queued and completed tasks from the queue.",
      )
      queue_remove_parser.add_argument(
          "--queued",
          action="store_true",
          help="Remove all queued tasks from the queue.",
      )
      queue_remove_parser.add_argument(
          "--success",
          action="store_true",
          help="Remove all successful tasks from the queue.",
      )
      queue_remove_parser.add_argument(
          "--failed",
          action="store_true",
          help="Remove all failed tasks from the queue.",
      )
      queue_remove_parser.add_argument(
          "task",
          nargs="*",
          help="Tasks to remove.",
          metavar="<task>",
      )
      queue_remove_parser.set_defaults(func=CmdQueueRemove)
  
file_path: dvc/dvc/commands/queue/remove.py
imports: from dvc.cli import formatter
  from dvc.cli.command import CmdBase
  from dvc.cli.utils import append_doc_link
  from dvc.exceptions import InvalidArgumentError
  from dvc.log import logger
  from dvc.ui import ui
label_desc: Use image node_id 1 for calling a global function with example usage: add_parser(queue_subparsers, parent_parser) without return types