code: def test_commit_dos2unix(tmp_dir, dvc):
      tmp_dir.gen("foo", "foo")
      (tmp_dir / "foo.dvc").dump(
          {
              "outs": [
                  {
                      "path": "foo",
                      "md5": "acbd18db4cc2f85cedef654fccc4a4d8",
                      "size": 3,
                  },
              ]
          }
      )
      legacy_content = (tmp_dir / "foo.dvc").read_text()
      assert "hash: md5" not in legacy_content
  
      dvc.commit("foo.dvc", force=True)
      assert (tmp_dir / "foo.dvc").read_text() == legacy_content
  
      tmp_dir.gen("foo", "modified")
      dvc.commit("foo.dvc", force=True)
      content = (tmp_dir / "foo.dvc").read_text()
      assert "hash: md5" in content
  
imports: import os
  import textwrap
  import pytest
  from dvc.dependency.base import DependencyDoesNotExistError
  from dvc.dvcfile import PROJECT_FILE
  from dvc.fs import localfs
  from dvc.output import OutputDoesNotExistError
  from dvc.stage.exceptions import StageCommitError
label_desc: Use image node_id 16 for calling a global function with example usage: test_commit_dos2unix(tmp_dir, dvc) without return types