code: def add_parser(experiments_subparsers, parent_parser):
      EXPERIMENTS_DIFF_HELP = "Show changes between experiments."
  
      experiments_diff_parser = experiments_subparsers.add_parser(
          "diff",
          parents=[parent_parser],
          description=append_doc_link(
              EXPERIMENTS_DIFF_HELP, "exp/diff"
          ),
          help=EXPERIMENTS_DIFF_HELP,
          formatter_class=formatter.RawDescriptionHelpFormatter,
      )
      experiments_diff_parser.add_argument(
          "a_rev",
          nargs="?",
          help="Old experiment to compare (defaults to HEAD)",
      ).complete = completion.EXPERIMENT
      experiments_diff_parser.add_argument(
          "b_rev",
          nargs="?",
          help="New experiment to compare (defaults to the current workspace)",
      ).complete = completion.EXPERIMENT
      experiments_diff_parser.add_argument(
          "--all",
          action="store_true",
          default=False,
          help="Show unchanged metrics/params as well.",
      )
      experiments_diff_parser.add_argument(
          "--param-deps",
          action="store_true",
          default=False,
          help="Show only params that are stage dependencies.",
      )
      experiments_diff_parser.add_argument(
          "--json",
          action="store_true",
          default=False,
          help="Show output in JSON format.",
      )
      experiments_diff_parser.add_argument(
          "--md",
          action="store_true",
          default=False,
          dest="markdown",
          help="Show tabulated output in the Markdown format (GFM).",
      )
      experiments_diff_parser.add_argument(
          "--no-path",
          action="store_true",
          default=False,
          help="Don't show metric/param path.",
      )
      experiments_diff_parser.add_argument(
          "--precision",
          type=int,
          help=(
              "Round metrics/params to `n` digits precision after the decimal "
              f"point. Rounds to {DEFAULT_PRECISION} digits by default."
          ),
          metavar="<n>",
      )
      experiments_diff_parser.set_defaults(func=CmdExperimentsDiff)
  
file_path: dvc/dvc/commands/experiments/diff.py
imports: from dvc.cli import completion, formatter
  from dvc.cli.command import CmdBase
  from dvc.cli.utils import append_doc_link
  from dvc.commands.metrics import DEFAULT_PRECISION
  from dvc.exceptions import DvcException
  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(experiments_subparsers, parent_parser) without return types