code: def test_checkout_suggest_git(tmp_dir, dvc, scm):
      with pytest.raises(CheckoutErrorSuggestGit) as e:
          dvc.checkout(targets="gitbranch")
      assert isinstance(e.value.__cause__, NoOutputOrStageError)
      assert isinstance(
          e.value.__cause__.__cause__, StageFileDoesNotExistError
      )
  
      with pytest.raises(CheckoutErrorSuggestGit) as e:
          dvc.checkout(targets="foobar")
      assert isinstance(e.value.__cause__, NoOutputOrStageError)
      assert isinstance(
          e.value.__cause__.__cause__, StageFileDoesNotExistError
      )
  
      with pytest.raises(CheckoutErrorSuggestGit) as e:
          dvc.checkout(targets="looks-like-dvcfile.dvc")
      assert isinstance(e.value.__cause__, StageFileDoesNotExistError)
      assert e.value.__cause__.__cause__ is None
  
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 13 for calling a global function with example usage: test_checkout_suggest_git(tmp_dir, dvc, scm) without return types