code: def test_cli_logout(
      exists: mock.MagicMock, unlink: mock.MagicMock, creds: bool
  ):
      exists.return_value = creds
      runner = CliRunner()
      runner.invoke(logout)
  
      exists.assert_called_once_with()
      if creds:
          unlink.assert_called_once_with()
      else:
          unlink.assert_not_called()
  
file_path: pytorch-lightning/tests/tests_app/cli/test_cli.py
imports: import os
  from unittest import mock
  from unittest.mock import MagicMock
  import pytest
  from click.testing import CliRunner
  from lightning.app import __version__
  from lightning.app.cli.lightning_cli import _main, login, logout, run
  from lightning.app.cli.lightning_cli_delete import delete
  from lightning.app.cli.lightning_cli_list import get_list, list_apps
  from lightning.app.utilities.exceptions import _ApiExceptionHandler
label_desc: Use image node_id 6 for calling a global function with example usage: test_cli_logout(exists, unlink, creds) without return types