code: def get_default_id_token_credentials(
      target_audience: str | None,
      request: google.auth.transport.Request = None,
  ) -> google_auth_credentials.Credentials:
      """Gets the default ID Token credentials for the current environment.
  
      `Application Default Credentials`_ provides an easy way to obtain credentials to call Google APIs for
      server-to-server or local applications.
  
      .. _Application Default Credentials: https://developers.google.com\
          /identity/protocols/application-default-credentials
  
      :param target_audience: The intended audience for these credentials.
      :param request: An object used to make HTTP requests. This is used to detect whether the application
              is running on Compute Engine. If not specified, then it will use the standard library http client
              to make requests.
      :return: the current environment's credentials.
      :raises ~google.auth.exceptions.DefaultCredentialsError:
          If no credentials were found, or if the credentials found were invalid.
      """
      checkers = (
          lambda: _get_explicit_environ_credentials(target_audience),
          lambda: _get_gcloud_sdk_credentials(target_audience),
          lambda: _get_gce_credentials(target_audience, request),
      )
  
      for checker in checkers:
          current_credentials = checker()
          if current_credentials is not None:
              return current_credentials
  
      raise exceptions.DefaultCredentialsError(
          f"""Could not automatically determine credentials. Please set {environment_vars.CREDENTIALS} or
          explicitly create credentials and re-run the application. For more information, please see
          https://cloud.google.com/docs/authentication/getting-started
  """.strip()
      )
  
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 5 for calling a global function with example usage: get_default_id_token_credentials(target_audience, request) and returns: current_credentials