
    3j                     V    S SK Jr  S SKJr  SSKJr  S/r\" SS9S\S	\S
\4S j5       rg)    )Any)Proxy   )compatibilityannotateF)is_backward_compatiblevaltypereturnc                     [        U [        5      (       aS  U R                  R                  (       a&  [	        SU R                  R                   SU S35      eXR                  l        U $ U $ )a  
Annotates a Proxy object with a given type.

This function annotates a val with a given type if a type of the val is a torch.fx.Proxy object
Args:
    val (object): An object to be annotated if its type is torch.fx.Proxy.
    type (object): A type to be assigned to a given proxy object as val.
Returns:
    The given val.
Raises:
    RuntimeError: If a val already has a type in its node.
zJTried to annotate a value that already had a type on it! Existing type is z and new type is z. This could happen if you tried to annotate a function parameter value (in which case you should use the type slot on the function signature) or you called annotate on the same value twice)
isinstancer   noder
   RuntimeError)r	   r
   s     K/home/wildlama/miniconda3/lib/python3.13/site-packages/torch/fx/annotate.pyr   r      sd     #u88==%%(XX]]O 4##'& )34  !HHM

    N)	typingr   torch.fx.proxyr   _compatibilityr   __all__r
   r    r   r   <module>r      sE       ) , e,# T c  -r   