code: def test_run_repeat(tmp_dir, dvc, run_copy):
      from dvc.dvcfile import PROJECT_FILE, load_file
      from dvc.stage import PipelineStage
  
      tmp_dir.dvc_gen("foo", "foo")
      run_copy("foo", "foo1", name="copy-foo-foo1")
      run_copy("foo1", "foo2", name="copy-foo1-foo2")
      run_copy("foo2", "foo3", name="copy-foo2-foo3")
  
      stages = list(load_file(dvc, PROJECT_FILE).stages.values())
      assert len(stages) == 3
      assert all(isinstance(stage, PipelineStage) for stage in stages)
      assert {stage.name for stage in stages} == {
          "copy-foo-foo1",
          "copy-foo1-foo2",
          "copy-foo2-foo3",
      }
  
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 5 for calling a global function with example usage: test_run_repeat(tmp_dir, dvc, run_copy) without return types