code: def test_dvcfile_dump_preserves_meta(tmp_dir, dvc, run_copy):
      tmp_dir.gen("foo", "foo")
      stage = run_copy("foo", "bar", name="run_copy")
      dvcfile = stage.dvcfile
  
      data = dvcfile._load()[0]
      metadata = {"name": "copy-file"}
      stage.meta = metadata
      data["stages"]["run_copy"]["meta"] = metadata
  
      dvcfile.dump(stage)
      assert dvcfile._load()[0] == data
      assert (
          dvcfile._load()[0]["stages"]["run_copy"]["meta"] == metadata
      )
  
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 16 for calling a global function with example usage: test_dvcfile_dump_preserves_meta(tmp_dir, dvc, run_copy) without return types