  def __init__(self, az_account: 'account.AZAccount') -> None:
    """Initialize the AZCompute class.

    Args:
      az_account (AZAccount): An Azure account object.
    """
    self.az_account = az_account
    self.compute_client = compute_sdk.ComputeManagementClient(
        self.az_account.credentials,
        self.az_account.subscription_id
    )  # type: compute_sdk.ComputeManagementClient
    self.quota_client = AzureReservationAPI(
        credential=self.az_account.credentials)
    resource_client = ResourceManagementClient(
        credential=self.az_account.credentials,
        subscription_id=self.az_account.subscription_id)
    while True:
      capacity_provider = resource_client.providers.get('Microsoft.Capacity')
      if capacity_provider.registration_state == 'Registered':
        logger.debug('Microsoft.Capacity provider already registered')
        break
      if capacity_provider.registration_state == 'NotRegistered':
        # This should only have to be done once per Subscription.
        logger.debug('Registering Microsoft.Capacity provider')
        resource_client.providers.register('Microsoft.Capacity')
      elif capacity_provider.registration_state == 'Registering':
        sleep(5)
      else:
        logger.warning(
            'Unable to register Capacity provider: {0!s}'.format(
                capacity_provider))
Initialize the AZCompute class.

Args:
az_account (AZAccount): An Azure account object.
libcloudforensics/providers/azure/internal/compute.py