code: def test_diff_with_unchanged(tmp_dir, scm, dvc):
      tmp_dir.gen("params.yaml", "foo: bar\nxyz: val")
      dvc.run(
          cmd="echo params.yaml", params=["foo,xyz"], name="echo-params"
      )
      scm.add(["params.yaml", "Dvcfile"])
      scm.commit("bar")
  
      tmp_dir.scm_gen("params.yaml", "foo: baz\nxyz: val", commit="baz")
      tmp_dir.scm_gen("params.yaml", "foo: qux\nxyz: val", commit="qux")
  
      assert dvc.params.diff(a_rev="HEAD~2", all=True) == {
          "diff": {
              "params.yaml": {
                  "foo": {"old": "bar", "new": "qux"},
                  "xyz": {"old": "val", "new": "val"},
              }
          }
      }
  
file_path: dvc/tests/func/params/test_diff.py
imports: from os.path import join
  import pytest
  from dvc.utils import relpath
label_desc: Use image node_id 9 for calling a global function with example usage: test_diff_with_unchanged(tmp_dir, scm, dvc) without return types