code: def test_checkouts_for_pipeline_tracked_outs(
      tmp_dir, dvc, scm, run_copy
  ):
      tmp_dir.gen("foo", "foo")
      stage1 = run_copy("foo", "bar", name="copy-foo-bar")
      tmp_dir.gen("lorem", "lorem")
      stage2 = run_copy("lorem", "ipsum", name="copy-lorem-ipsum")
  
      for out in ["bar", "ipsum"]:
          (tmp_dir / out).unlink()
      assert dvc.checkout(["bar"])["added"] == ["bar"]
  
      (tmp_dir / "bar").unlink()
      assert set(dvc.checkout([PROJECT_FILE])["added"]) == {
          "bar",
          "ipsum",
      }
  
      for out in ["bar", "ipsum"]:
          (tmp_dir / out).unlink()
      assert set(dvc.checkout([stage1.addressing])["added"]) == {"bar"}
  
      (tmp_dir / "bar").unlink()
      assert set(dvc.checkout([stage2.addressing])["added"]) == {
          "ipsum"
      }
  
      (tmp_dir / "ipsum").unlink()
      assert set(dvc.checkout()["added"]) == {"bar", "ipsum"}
  
imports: import logging
  import os
  import shutil
  import stat
  import textwrap
  import pytest
  from dvc.cli import main
  from dvc.dvcfile import PROJECT_FILE, load_file
  from dvc.exceptions import CheckoutError, CheckoutErrorSuggestGit, NoOutputOrStageError
  from dvc.fs import system
  from dvc.stage.exceptions import StageFileDoesNotExistError
  from dvc.utils import relpath
  from dvc.utils.fs import remove
  from tests.utils import get_gitignore_content
label_desc: Use image node_id 33 for calling a global function with example usage: test_checkouts_for_pipeline_tracked_outs(tmp_dir, dvc, scm, run_copy) without return types