I tried in my environment and got below results:
You can use this document for the azure service health library using python.
To start with the Azure Management Health Client Library, you need to install package:
pip install azure-mgmt-resourcehealth
I used the sample code to get the availability status of the azure-resource eg-(virtual-machine).
Code:
from azure.mgmt.resourcehealth import MicrosoftResourceHealth
from azure.identity import DefaultAzureCredential
credential = DefaultAzureCredential()
subscription_id = "b83c1ed3-c5b6-44fb-b5ba-2b83a074c23f"
health_client = MicrosoftResourceHealth(credential, subscription_id)
query= health_client.availability_statuses.get_by_resource(resource_uri="/subscriptions/<subscriptionID>/resourceGroups/<your-resource-grp>/providers/Microsoft.Compute/virtualMachines/vm1326")
print(query.properties)
Output:

{'additional_properties': {'title': 'Available', 'occuredTime': '2023-02-21T12:04:17Z', 'context': 'Not Applicable', 'category': 'Not Applicable'}, 'availability_state': 'Available', 'summary': "There aren't any known Azure platform problems affecting this virtual machine.", 'detailed_status': None, 'reason_type': '', 'root_cause_attribution_time': None, 'health_event_type': None, 'health_event_cause': None, 'health_event_category': None, 'health_event_id': None, 'resolution_eta': None, 'occurred_time': None, 'reason_chronicity': 'Persistent', 'reported_time': datetime.datetime(2023, 2, 21, 13, 4, 46, 863775, tzinfo=<isodate.tzinfo.Utc object at 0x000001B773A58F70>), 'recently_resolved': None, 'recommended_actions': None, 'service_impacting_events': None}