code: def test_checkout_with_deps_cli(tmp_dir, dvc, copy_script):
      tmp_dir.dvc_gen({"foo": "foo", "data": {"file": "file"}})
      dvc.run(
          outs=["file1"],
          deps=["foo", "copy.py"],
          cmd="python copy.py foo file1",
          name="copy-file",
      )
      remove("foo")
      remove("file1")
  
      assert not os.path.exists("foo")
      assert not os.path.exists("file1")
  
      ret = main(["checkout", "--force", "copy-file", "--with-deps"])
      assert ret == 0
  
      assert os.path.exists("foo")
      assert os.path.exists("file1")
  
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 11 for calling a global function with example usage: test_checkout_with_deps_cli(tmp_dir, dvc, copy_script) without return types