code: def authenticate(
      creds: AnyGCPCreds,
  ) -> Tuple[Credentials, Optional[str]]:
      """
      :raises BackendAuthError:
      :return: GCP credentials and project_id
      """
      credentials, project_id = get_credentials(creds)
      validate_credentials(credentials)
      return credentials, project_id
  
file_path: dstack/src/dstack/_internal/core/backends/gcp/auth.py
imports: import json
  from typing import Optional, Tuple
  import google.auth
  from google.auth.credentials import Credentials
  from google.auth.exceptions import DefaultCredentialsError
  from google.cloud import storage
  from google.oauth2 import service_account
  from dstack._internal.core.errors import BackendAuthError
  from dstack._internal.core.models.backends.gcp import AnyGCPCreds, GCPDefaultCreds, GCPServiceAccountCreds
label_desc: Use image node_id 1 for calling a global function with example usage: authenticate(creds) and returns: credentials,  project_id