code: def default_credentials(scopes: Optional[List[str]] = None):
      credentials_file = first_extant_file(
          os.environ.get("AZURE_APPLICATION_CREDENTIALS"),
          "/azure-credentials/credentials.json",
          "/gsa-key/key.json",  # FIXME: make this file path cloud-agnostic
      )
  
      if credentials_file:
          log.info(f"using credentials file {credentials_file}")
          return AzureCredentials.from_file(credentials_file, scopes)
  
      return AzureCredentials(DefaultAzureCredential(), scopes)
  
imports: import concurrent.futures
  import os
  import json
  import time
  import logging
  from types import TracebackType
  from typing import Any, List, Optional, Type, Union, Tuple, Dict
  from azure.identity.aio import DefaultAzureCredential, ClientSecretCredential
  from azure.core.credentials import AccessToken
  from azure.core.credentials_async import AsyncTokenCredential
  import msal
  from hailtop.utils import first_extant_file, blocking_to_async
  from ..common.credentials import CloudCredentials
label_desc: Use image node_id 4 for calling the AzureCredentials obj's underlying member method code with example usage: obj.default_credentials(scopes) and returns: AzureCredentials, AzureCredentials