code: def test_modified_data_dep(
      tmp_dir, scm, dvc, workspace, params, target, copy_script
  ):
      tmp_dir.dvc_gen("data", "data")
      tmp_dir.gen("params.yaml", "foo: 1")
      exp_stage = dvc.run(
          cmd="python copy.py params.yaml metrics.yaml",
          metrics_no_cache=["metrics.yaml"],
          params=["foo"],
          name="copy-file",
          deps=["copy.py", "data"],
      )
      scm.add(
          [
              "dvc.yaml",
              "dvc.lock",
              "copy.py",
              "params.yaml",
              "metrics.yaml",
              "data.dvc",
              ".gitignore",
          ]
      )
      scm.commit("init")
  
      tmp_dir.gen("params.yaml", params)
      tmp_dir.gen("data", "modified")
  
      results = dvc.experiments.run(
          exp_stage.addressing if target else None,
          tmp_dir=not workspace,
      )
      exp = first(results)
  
      for rev in dvc.brancher(revs=[exp]):
          if rev != exp:
              continue
          with dvc.dvcfs.open("metrics.yaml") as fobj:
              assert fobj.read().strip() == params
          with dvc.dvcfs.open("data") as fobj:
              assert fobj.read().strip() == "modified"
  
      if workspace:
          assert (
              tmp_dir / "metrics.yaml"
          ).read_text().strip() == params
          assert (tmp_dir / "data").read_text().strip() == "modified"
  
imports: import itertools
  import logging
  import os
  import stat
  from textwrap import dedent
  import pytest
  from configobj import ConfigObj
  from funcy import first
  from dvc.dvcfile import PROJECT_FILE
  from dvc.env import DVC_EXP_BASELINE_REV, DVC_EXP_NAME, DVC_ROOT, DVC_STUDIO_OFFLINE, DVC_STUDIO_REPO_URL, DVC_STUDIO_TOKEN, DVC_STUDIO_URL
  from dvc.exceptions import DvcException, ReproductionError
  from dvc.repo.experiments.exceptions import ExperimentExistsError
  from dvc.repo.experiments.queue.base import BaseStashQueue
  from dvc.repo.experiments.refs import CELERY_STASH
  from dvc.repo.experiments.utils import exp_refs_by_rev
  from dvc.scm import SCMError, resolve_rev
  from dvc.stage.exceptions import StageFileDoesNotExistError
  from dvc.testing.scripts import COPY_SCRIPT
  from dvc.utils.serialize import PythonFileCorruptedError
label_desc: Use image node_id 18 for calling a global function with example usage: test_modified_data_dep(tmp_dir, scm, dvc, workspace, params, target, copy_script) without return types