def METHOD_NAME(tmp_dir, scm, dvc, run_copy_metrics):
    def _gen(val):
        tmp_dir.gen({"m_temp.yaml": str(val)})
        run_copy_metrics(
            "m_temp.yaml", "m.yaml", name="copy-metrics", metrics=["m.yaml"]
        )
        dvc.scm.commit(str(val))
    _gen(1)
    _gen(2)
    _gen(3)
    expected = {"m.yaml": {"": {"old": 1, "new": 3, "diff": 2}}}
    assert dvc.metrics.diff(a_rev="HEAD~2") == expected