code: def test_checkout_executable(tmp_dir, dvc):
      tmp_dir.dvc_gen("foo", "foo")
  
      contents = (tmp_dir / "foo.dvc").parse()
      contents["outs"][0]["isexec"] = True
      (tmp_dir / "foo.dvc").dump(contents)
  
      dvc.checkout("foo")
  
      isexec = os.stat("foo").st_mode & stat.S_IEXEC
      if os.name == "nt":
          # NOTE: you can't set exec bits on Windows
          assert not isexec
      else:
          assert isexec
  
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 34 for calling a global function with example usage: test_checkout_executable(tmp_dir, dvc) without return types