code: def run(self):
      try:
          diff = self.repo.experiments.diff(
              a_rev=self.args.a_rev,
              b_rev=self.args.b_rev,
              all=self.args.all,
              param_deps=self.args.param_deps,
          )
      except DvcException:
          logger.exception("failed to show experiments diff")
          return 1
  
      if self.args.json:
          ui.write_json(diff)
      elif diff:
          from dvc.compare import show_diff
  
          precision = self.args.precision or DEFAULT_PRECISION
          diffs = [("metrics", "Metric"), ("params", "Param")]
          for idx, (key, title) in enumerate(diffs):
              if idx:
                  # we are printing tables even in `--quiet` mode
                  # so we should also be printing the "table" separator
                  ui.write(force=True)
  
              show_diff(
                  diff[key],
                  title=title,
                  markdown=self.args.markdown,
                  no_path=self.args.no_path,
                  on_empty_diff="diff not supported",
                  precision=precision if key == "metrics" else None,
                  a_rev=self.args.a_rev,
                  b_rev=self.args.b_rev,
              )
  
      return 0
  
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 the CmdExperimentsDiff obj's underlying member method code with example usage: obj.run() and returns: int, int