code: def test_mixed_git_dvc_out(tmp_dir, scm, dvc, exp_stage):
      (tmp_dir / "dir").mkdir()
      dir_metrics = os.path.join("dir", "metrics.yaml")
      dvc.stage.add(
          cmd=f"python copy.py params.yaml {dir_metrics}",
          metrics=[dir_metrics],
          params=["foo"],
          name="copy-file",
          deps=["copy.py"],
          force=True,
      )
      dvc.stage.add(
          cmd=f"python copy.py {dir_metrics} metrics.yaml",
          metrics_no_cache=["metrics.yaml"],
          name="copy-dir-file",
          deps=["dir"],
      )
      scm.add(["dvc.yaml", "dvc.lock"])
      scm.commit("add dir stage")
  
      exp = first(dvc.experiments.run())
      assert (tmp_dir / "dir" / "metrics.yaml").exists()
      git_fs = scm.get_fs(exp)
      assert not git_fs.exists("dir/metrics.yaml")
  
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 31 for calling a global function with example usage: test_mixed_git_dvc_out(tmp_dir, scm, dvc, exp_stage) without return types