o
    ýÞh	  ã                   @   sR   d Z ddlZddlmZ ddlmZ dedefdd„Zd	ejdeddfd
d„ZdS )z-Helper functions for commonly used utilities.é    N)ÚAny)Ú_helpersÚresponseÚreturnc                 Ã   s,   �z
|   ¡ I dH }|W S  ty   Y dS w )aà  
    Parses an async response, attempting to decode JSON.

    Args:
        response: The response object to parse. This can be any type, but
            it is expected to have a `json()` method if it contains JSON.

    Returns:
        The parsed response. If the response contains valid JSON, the
        decoded JSON object (e.g., a dictionary) is returned.
        If the response does not have a `json()` method or if the JSON
        decoding fails, None is returned.
    N)ÚjsonÚ	Exception)r   Újson_response© r	   úX/var/www/html/premium_crap/venv/lib/python3.10/site-packages/google/auth/aio/_helpers.pyÚ_parse_response_async   s   €ýr   Úloggerc                 Ã   s$   �t  | ¡rd}t  | |¡ dS dS )zÁ
    Logs an Async HTTP response at the DEBUG level if logging is enabled.

    Args:
        logger: The logging.Logger instance to use.
        response: The HTTP response object to log.
    N)r   Úis_logging_enabledÚ_response_log_base)r   r   r   r	   r	   r
   Úresponse_log_async/   s
   €
ùr   )	Ú__doc__ÚloggingÚtypingr   Úgoogle.authr   r   ÚLoggerr   r	   r	   r	   r
   Ú<module>   s   