
    &g                    .    S r SSKJr  SSKJr  SSS jjrg)zGCP helpers.    )annotations)Anyc                P   SSK JnJn  SnUSU  3-  nSS0nU" XES9n U" XaS9 nUR                  nUR	                  5       R                  S	5      n	S S S 5        WS:w  a  Sn[        U5      e[        W	S9$ ! , (       d  f       N*= f! [         a  n
S
U
-  n[        U5      S eS n
A
ff = f)Nr   )RequesturlopenzMhttp://metadata/computeMetadata/v1/instance/service-accounts/default/identityz
?audience=zMetadata-FlavorGoogle)headers)timeoututf8z'Failed to acquire IMDS access token: %s   z$Failed to acquire IMDS access token.)access_token)	urllib.requestr   r   statusreaddecode	Exception
ValueErrordict)resourcer
   r   r   urlr	   requestresponser   bodyemsgs               YC:\Suresh\moveshuttle\MDcreated\moveengine\venv\Lib\site-packages\pymongo/_gcp_helpers.py_get_gcp_responser      s    /
YCZz""C (+Gc+G(W.(__F==?))&1D / }4oT"" /.  (7!;o4'(s4   B ,A4B 4
B>B B 
B%B  B%N)   )r   strr
   floatreturnzdict[str, Any])__doc__
__future__r   typingr   r        r   <module>r'      s     " #r&   