o
    riN                     @   s4   d dl Z d dlmZ 	d	ddZdd Zdd ZdS )
    N)merge_dictsc                 C   sV   | | i }t|| dt| di i}t|| t|| |d ur)t|| |S )N__default__)getresolve_referencescopydeepcopyr   _merge_client_retry_config)endpoint_prefixretry_modeldefinitionsclient_retry_configservice_configfinal_retry_config r   Q/var/www/html/pca-backend/venv/lib/python3.10/site-packages/botocore/translate.pybuild_retry_config   s   
	


r   c                 C   s*   | d}|d ur|d | d d< d S d S )Nmax_attempts   r   )r   )retry_configr   max_retry_attempts_overrider   r   r   r   *   s
   
r   c                 C   sd   |   D ]+\}}t|tr/t|dkr*t| d dkr*|t| d  | |< qt|| qdS )aJ  Recursively replace $ref keys.

    To cut down on duplication, common definitions can be declared
    (and passed in via the ``definitions`` attribute) and then
    references as {"$ref": "name"}, when this happens the reference
    dict is placed with the value from the ``definition`` dict.

    This is recursively done.

    r   r   z$refN)items
isinstancedictlenlistkeysvaluesr   )configr   keyvaluer   r   r   r   =   s   
 
r   )N)r   botocore.utilsr   r   r   r   r   r   r   r   <module>   s   
