code: def test_dvcfile_dump_preserves_desc(tmp_dir, dvc, run_copy):
      tmp_dir.gen("foo", "foo")
      stage_desc = "test stage description"
      out_desc = "test out description"
  
      stage = run_copy("foo", "bar", name="run_copy", desc=stage_desc)
      dvcfile = stage.dvcfile
  
      data = dvcfile._load()[0]
      data["stages"]["run_copy"]["outs"][0] = {
          "bar": {"desc": out_desc}
      }
      (tmp_dir / dvcfile.path).dump(data)
  
      assert stage.desc == stage_desc
      stage.outs[0].annot.desc = out_desc
      dvcfile.dump(stage)
      loaded = dvcfile._load()[0]
      assert loaded == data
      assert loaded["stages"]["run_copy"]["desc"] == stage_desc
      assert (
          loaded["stages"]["run_copy"]["outs"][0]["bar"]["desc"]
          == out_desc
      )
  
imports: import textwrap
  import pytest
  from dvc.annotations import Annotation
  from dvc.dvcfile import LOCK_FILE, PROJECT_FILE, ParametrizedDumpError, SingleStageFile, load_file
  from dvc.stage.exceptions import StageFileDoesNotExistError
  from dvc.stage.loader import StageNotFound
  from dvc.utils.strictyaml import YAMLValidationError
label_desc: Use image node_id 17 for calling a global function with example usage: test_dvcfile_dump_preserves_desc(tmp_dir, dvc, run_copy) without return types