code: def test_diff_dict(tmp_dir, scm, dvc):
      tmp_dir.gen("params.yaml", "foo:\n  bar: baz")
      dvc.run(
          cmd="echo params.yaml", params=["foo"], name="echo-params"
      )
      scm.add(["params.yaml", "Dvcfile"])
      scm.commit("foo")
  
      tmp_dir.gen("params.yaml", "foo:\n  bar: qux")
  
      assert dvc.params.diff() == {
          "diff": {
              "params.yaml": {"foo.bar": {"old": "baz", "new": "qux"}}
          }
      }
  
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 8 for calling a global function with example usage: test_diff_dict(tmp_dir, scm, dvc) without return types