code: def test_checkout_target_recursive_should_not_remove_other_used_files(
      tmp_dir, dvc
  ):
      tmp_dir.dvc_gen(
          {"foo": "foo", "bar": "bar", "data": {"file": "file"}}
      )
      assert main(["checkout", "-R", "data"]) == 0
      assert (tmp_dir / "foo").exists()
      assert (tmp_dir / "bar").exists()
  
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 14 for calling a global function with example usage: test_checkout_target_recursive_should_not_remove_other_used_files(tmp_dir, dvc) without return types