class_docstr: Base for interaction with Databricks.
  
  :param databricks_conn_id: Reference to the :ref:`Databricks connection <howto/connection:databricks>`.
  :param timeout_seconds: The amount of time in seconds the requests library
      will wait before timing-out.
  :param retry_limit: The number of times to retry the connection in case of
      service outages.
  :param retry_delay: The number of seconds to wait between retries (it
      might be a floating point number).
  :param retry_args: An optional dictionary with arguments passed to ``tenacity.Retrying`` class.
class_docstr_tok: ["Base","for","interaction","with","Databricks",".",":","param","databricks_conn_id",":","Reference","to","the",":","ref",":","`","Databricks","connection","<","howto\/connection",":","databricks",">","`",".",":","param","timeout_seconds",":","The","amount","of","time","in","seconds","the","requests","library","will","wait","before","timing-out",".",":","param","retry_limit",":","The","number","of","times","to","retry","the","connection","in","case","of","service","outages",".",":","param","retry_delay",":","The","number","of","seconds","to","wait","between","retries","(","it","might","be","a","floating","point","number",")",".",":","param","retry_args",":","An","optional","dictionary","with","arguments","passed","to","``","tenacity.Retrying","``","class","."]
docstr: Check for Azure Metadata Service.
  
  https://docs.microsoft.com/en-us/azure/virtual-machines/linux/instance-metadata-service
docstr_tok: ["Check","for","Azure","Metadata","Service",".","https",":","\/\/docs.microsoft.com\/en-us\/azure\/virtual-machines\/linux\/instance-metadata-service"]
code: def _check_azure_metadata_service() -> None:
      """
      Check for Azure Metadata Service.
  
      https://docs.microsoft.com/en-us/azure/virtual-machines/linux/instance-metadata-service
      """
      try:
          jsn = requests.get(
              AZURE_METADATA_SERVICE_INSTANCE_URL,
              params={"api-version": "2021-02-01"},
              headers={"Metadata": "true"},
              timeout=2,
          ).json()
          if (
              "compute" not in jsn
              or "azEnvironment" not in jsn["compute"]
          ):
              raise AirflowException(
                  f"Was able to fetch some metadata, but it doesn't look like Azure Metadata: {jsn}"
              )
      except (requests_exceptions.RequestException, ValueError) as e:
          raise AirflowException(
              f"Can't reach Azure Metadata Service: {e}"
          )
  
imports: from __future__ import annotations
  import copy
  import platform
  import time
  from functools import cached_property
  from typing import TYPE_CHECKING, Any
  from urllib.parse import urlsplit
  import aiohttp
  import requests
  from requests import PreparedRequest, exceptions
  from requests.auth import AuthBase, HTTPBasicAuth
  from requests.exceptions import JSONDecodeError
  from tenacity import AsyncRetrying, RetryError, Retrying, retry_if_exception, stop_after_attempt, wait_exponential
  from airflow import __version__
  from airflow.exceptions import AirflowException
  from airflow.hooks.base import BaseHook
  from airflow.providers_manager import ProvidersManager
label_desc: Use image node_id 14 for calling the BaseDatabricksHook obj's underlying member method code with example usage: obj._check_azure_metadata_service() without return types