
    PeN                     .    d dl Z d dlmZ 	 ddZd Zd Zy)    N)merge_dictsc                     |j                  | i       }t        ||       dt        j                  |j                  di             i}t        ||       t	        ||       |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_configs         4/usr/lib/python3/dist-packages/botocore/translate.pybuild_retry_configr      sq     !___b9N~{3 	t}}[__]B%GH );7"N3&"#57JK    c                 B    |j                  d      }||dz   | d   d<   y y )Nmax_attempts   r   )r   )retry_configr   max_retry_attempts_overrides      r   r
   r
   *   s7    "5"9"9."I". (!+ 	]#N3 /r   c                    | j                         D ]r  \  }}t        |t              st        |      dk(  rBt	        |j                               d   dk(  r#|t	        |j                               d      | |<   gt        ||       t y)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values       r   r   r   =   sq     lln 7
UeT"5zQ4

#5a#8F#B)$u||~*>q*ABs"5+67r   )N)r   botocore.utilsr   r   r
   r    r   r   <module>r&      s#     & DH.
&7r   