code: def test_metrics_diff_with_unchanged(
      tmp_dir, scm, dvc, run_copy_metrics
  ):
      tmp_dir.gen("metrics_temp.yaml", "foo: 1\nxyz: 10")
      run_copy_metrics(
          "metrics_temp.yaml",
          "metrics.yaml",
          name="copy-metrics",
          metrics_no_cache=["metrics.yaml"],
          commit="1",
      )
  
      tmp_dir.scm_gen("metrics.yaml", "foo: 2\nxyz: 10", commit="2")
      tmp_dir.scm_gen("metrics.yaml", "foo: 3\nxyz: 10", commit="3")
  
      assert dvc.metrics.diff(a_rev="HEAD~2", all=True) == {
          "diff": {
              "metrics.yaml": {
                  "foo": {"old": 1, "new": 3, "diff": 2},
                  "xyz": {"old": 10, "new": 10, "diff": 0},
              }
          }
      }
  
imports: import json
  from os.path import join
  import pytest
  from dvc.cli import main
  from dvc.utils import relpath
  from dvc.utils.serialize import JSONFileCorruptedError
label_desc: Use image node_id 9 for calling a global function with example usage: test_metrics_diff_with_unchanged(tmp_dir, scm, dvc, run_copy_metrics) without return types