
    Ngs                         d dl Z d Zd ZdZdS )    Nc                  >    	 ddl m}  d}n# t          $ r d}Y nw xY w|S )Nr   )_messageTF)google._upbr   ImportError)r   has_upbs     G/var/www/html/ai-engine/env/lib/python3.11/site-packages/proto/utils.pyr   r      sI    ((((((   Ns    c                 `     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                              | 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)   sl     t-.. 	;t%5r::: ;d111/1r$xxD, "2;//    )	functoolswrapsproperty)r   r   s   ` r   cached_propertyr      sA     _R0 0 0 0 0 E??r   )r   )r   r   r   __all__ r   r   <module>r      s<           < r   