ó
    Eñi{  ã                   ó  • % S SK r S SKJr  S SKJr   " S S5      r\ R                  " 5       q\ R                  \R                  \ R                  \   4   \
S'   S\R                  S\SS4S	 jrS\R                  S\S-  4S
 jrg)é    N)Úcastc                   ó   • \ rS rSrSrg)Ú_Stateé   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__static_attributes__r   ó    Ú`/home/mande/repo/quber/.venv/lib/python3.13/site-packages/torch/distributed/_composable_state.pyr   r      s   † Úr   r   Ú_module_state_mappingÚmoduleÚstateÚreturnc                 óp   • U [         ;   a  [        SU  S35      e[        R                  " U5      [         U '   g )Nz
Inserting z more than once.)r   ÚAssertionErrorÚweakrefÚref)r   r   s     r   Ú_insert_module_stater      s4   € àÔ&Ó&Ü˜z¨&¨Ð1AÐBÓCÐCÜ$+§K¢K°Ó$6Ô˜&Ò!r   c                 ó¢   • [        U [        5      (       a  [        [        U 5      $ U [        ;   a   [        U    nU" 5       nUc  [	        S5      eU$ g)aX  
Return the ``_State`` in ``model``.

Given a ``module``, this API finds out if the module is also a ``_State``
instance or if the module is managed by a composable API. If the module
is also a ``_State``, ``module`` will be casted to ``_State` and returned.
If it is managed by a composable API, the corresponding ``_State`` will
be returned.
Nz(State has already been garbage collected)Ú
isinstancer   r   r   r   )r   Ú	state_refr   s      r   Ú_get_module_stater      sS   € ô �&œ&×!Ñ!Ü”F˜FÓ#Ð#ð Ô*Ó*Ü-¨fÑ5ˆIÙ“KˆEØ‰}Ü$Ð%OÓPÐPØˆLàr   )r   Útypingr   Útorch.nnÚnnr   ÚWeakKeyDictionaryr   ÚModuleÚReferenceTypeÚ__annotations__r   r   r   r   r   Ú<module>r#      s�   ðÜ Ý å ÷	ñ 	ð ×ÒÓð �w×0Ñ0Ø‡I�Iˆw×$Ñ$ VÑ,Ð,ñó  ð
7 §¡ð 7°6ð 7¸dô 7ð˜bŸi™ið ¨F°T©Mõ r   