code: def test_credentials(monkeypatch):
      class MockCreds:
          def refresh(self, req):
              pass
  
      creds = MockCreds()
      project_id = "project-foo"
  
      def mock_default(scopes):
          return (creds, project_id)
  
      def mock_from_service_account_file(f, scopes):
          return creds
  
      monkeypatch.setattr(google.auth, "default", mock_default)
      monkeypatch.setattr(
          google.auth.transport.requests, "Request", lambda: None
      )
      monkeypatch.setattr(
          google.oauth2.service_account.Credentials,
          "from_service_account_file",
          mock_from_service_account_file,
      )
  
      # test default creds
      cd = util.credentials()
      assert cd.credentials == creds
      assert cd.project_id == project_id
  
      # test creds file
      creds_type = util._SERVICE_ACCOUNT_TYPE
      with tempfile.TemporaryDirectory() as tmpdir:
          creds_dict = {"type": creds_type, "project_id": project_id}
  
          creds_file = os.path.join(tmpdir, "creds.json")
          with open(creds_file, "w") as f:
              json.dump(creds_dict, f)
  
          cd = util.credentials(creds_file)
          assert cd.credentials == creds
          assert cd.project_id == project_id
  
imports: import random
  import unittest
  from typing import List, Optional, Dict
  from unittest import mock
  import uuid
  import json
  import os
  import tempfile
  import yaml
  import hypothesis.strategies
  from hypothesis import given, settings
  from kubernetes.client.api_client import ApiClient
  from kubernetes.client import V1Job
  import pytest
  import argparse
  import google
  import caliban.platform.cloud.types
  import caliban.platform.gke.constants
  import caliban.platform.gke.util
  from caliban.platform.gke.types import NodeImage, OpStatus
  from caliban.platform.gke.util import trap
label_desc: Use image node_id 13 for calling a global function with example usage: test_credentials(monkeypatch) and returns: creds,  project_id, creds