code: def get_credential(
      creds: AnyAzureCreds,
  ) -> Tuple[AzureCredential, str]:
      if isinstance(creds, AzureClientCreds):
          credential = ClientSecretCredential(
              tenant_id=creds.tenant_id,
              client_id=creds.client_id,
              client_secret=creds.client_secret,
          )
          return credential, creds.tenant_id
  
      return DefaultAzureCredential(), None
  
file_path: dstack/src/dstack/_internal/core/backends/azure/auth.py
imports: from typing import Tuple, Union
  from azure.core.exceptions import ClientAuthenticationError
  from azure.identity import ClientSecretCredential, DefaultAzureCredential
  from azure.mgmt.subscription import SubscriptionClient
  from dstack._internal.core.errors import BackendAuthError
  from dstack._internal.core.models.backends.azure import AnyAzureCreds, AzureClientCreds, AzureDefaultCreds
label_desc: Use image node_id 2 for calling a global function with example usage: get_credential(creds) and returns: DefaultAzureCredential,  None, credential,  creds