o
    Rhs                     @   s    d dl Z dd Zdd ZdZdS )    Nc                  C   s0   zddl m}  d}W |S  ty   d}Y |S w )Nr   )_messageTF)google._upbr   ImportError)r   has_upb r   M/home/air/sanwanet/backup_V2/venv/lib/python3.10/site-packages/proto/utils.pyr      s   r   c                    s   t   fd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                    s@   t | dst| di   j| jvr | | j j< | j j S )N_cached_values)hasattrobject__setattr____name__r   )selffxr   r   inner)   s
   
zcached_property.<locals>.inner)	functoolswrapsproperty)r   r   r   r   r   cached_property   s   r   )r   )r   r   r   __all__r   r   r   r   <module>   s   
