code: def _get_gce_credentials(
      target_audience: str | None,
      request: google.auth.transport.Request | None = None,
  ) -> google_auth_credentials.Credentials | None:
      """Gets credentials and project ID from the GCE Metadata Service."""
      # Ping requires a transport, but we want application default credentials
      # to require no arguments. So, we'll use the _http_client transport which
      # uses http.client. This is only acceptable because the metadata server
      # doesn't do SSL and never requires proxies.
  
      # While this library is normally bundled with compute_engine, there are
      # some cases where it's not available, so we tolerate ImportError.
      try:
          from google.auth import compute_engine
          from google.auth.compute_engine import _metadata
      except ImportError:
          return None
      from google.auth.transport import _http_client
  
      if request is None:
          request = _http_client.Request()
  
      if _metadata.ping(request=request):
          return compute_engine.IDTokenCredentials(
              request,
              target_audience,
              use_metadata_identity_endpoint=True,
          )
  
      return None
  
file_path: airflow/airflow/providers/google/common/utils/id_token_credentials.py
imports: from __future__ import annotations
  import json
  import os
  from typing import TYPE_CHECKING
  import google.auth.transport
  from google.auth import credentials, environment_vars, exceptions
  from google.oauth2 import credentials, service_account
label_desc: Use image node_id 4 for calling a global function with example usage: _get_gce_credentials(target_audience, request) and returns: None, compute_engine, None