
    rhs                         d dl Z d Zd ZdZy)    Nc                  <    	 ddl m}  d}|S # t        $ r d}Y |S w xY w)Nr   )_messageTF)google._upbr   ImportError)r   has_upbs     ^/var/www/html/ai-insurance-compliance-backend/venv/lib/python3.12/site-packages/proto/utils.pyr   r      s1    ( N  Ns    c                 T     t        j                          fd       }t        |      S )zMake the callable into a cached property.

    Similar to @property, but the function will only be called once per
    object.

    Args:
        fx (Callable[]): The property function.

    Returns:
        Callable[]: The wrapped function.
    c                     t        | d      st        j                  | di        j                  | j                  vr |       | j                  j                  <   | j                  j                     S )N_cached_values)hasattrobject__setattr____name__r   )selffxs    r   innerzcached_property.<locals>.inner)   sf     t-.t%5r: ;;d111/1$xD, ""2;;//    )	functoolswrapsproperty)r   r   s   ` r   cached_propertyr      s,     __R0 0 E?r   )r   )r   r   r   __all__ r   r   <module>r      s    < r   