
    qi7                     (    d Z 	 ddededededef
dZy)	zQBase class for network utilities, providing exponential backoff time calculation.attemptmin_waitmax_wait
multiplierreturnc                     	 d| dz
  z  |z  }t        dt        ||            }t        ||      S # t        t        f$ r |cY S w xY w)a3  Calculate exponential backoff wait time.

    Args:
        attempt: Current attempt number (1-based)
        min_wait: Minimum wait time in seconds
        max_wait: Maximum wait time in seconds
        multiplier: Base multiplier for exponential calculation

    Returns:
        Wait time in seconds
              )maxmin
ValueErrorArithmeticError)r   r   r   r   expresults         G/opt/pipecat/venv/lib/python3.12/site-packages/pipecat/utils/network.pyexponential_backoff_timer   
   sS    GaK :-QC*+8V$$( s   ,/ AAN)   
   r	   )__doc__intfloatr        r   <module>r      s?    X RS!16IN
r   