code: def test_run_no_exec(tmp_dir, dvc, scm, run_copy):
      tmp_dir.dvc_gen("foo", "foo")
      assert not os.path.exists(PROJECT_FILE)
      stage = run_copy(
          "foo", "bar", name="copy-foo-to-bar", no_exec=True
      )
      assert isinstance(stage, PipelineStage)
      assert stage.name == "copy-foo-to-bar"
      assert os.path.exists(PROJECT_FILE)
      assert not os.path.exists(LOCK_FILE)
      assert not os.path.exists("bar")
  
      data, _ = stage.dvcfile._load()
      assert data["stages"]["copy-foo-to-bar"] == {
          "cmd": "python copy.py foo bar",
          "deps": ["copy.py", "foo"],
          "outs": ["bar"],
      }
      with open(".gitignore", encoding="utf-8") as fobj:
          assert fobj.read() == "/foo\n/bar\n"
  
imports: import logging
  import os
  import textwrap
  import uuid
  import pytest
  from funcy import get_in
  from dvc.cli import main
  from dvc.dependency import ParamsDependency
  from dvc.dependency.base import DependencyDoesNotExistError
  from dvc.dvcfile import LOCK_FILE, PROJECT_FILE, load_file
  from dvc.exceptions import ArgumentDuplicationError, CircularDependencyError, CyclicGraphError, InvalidArgumentError, OutputDuplicationError, OverlappingOutputPathsError
  from dvc.stage import PipelineStage
  from dvc.stage.exceptions import DuplicateStageName, InvalidStageName, StagePathNotDirectoryError, StagePathNotFoundError, StagePathOutsideError
  from dvc.utils.serialize import load_yaml
label_desc: Use image node_id 4 for calling a global function with example usage: test_run_no_exec(tmp_dir, dvc, scm, run_copy) without return types