
    קg                     B   d dl mZmZmZmZmZ d dlmZmZm	Z	m
Z
mZmZmZmZ ddlmZ ddgZdZd Zd	 Z eed
          Zd e_        d e_          ed          e            eed          Zd e_        d e_          ed          e           deeef         deee         ef         fdZdee         dedeeef         fdZdee         deee         ef         fdZdee         dedee         fdZ eeeede            eeeede           dS )    )AnyDictIterableListTuple)_dict_flatten_dict_flatten_with_keys_dict_unflatten_list_flatten_list_flatten_with_keys_list_unflattenContextregister_pytree_node   )compatibilityimmutable_listimmutable_dictzIf you are attempting to modify the kwargs or args of a torch.fx.Node object,
instead create a new copy of it and assign the copy to the node:
    new_args = ... # copy and mutate args
    node.args = new_args
c                 Z    t          dt          |           j         dt                     )N'z$' object does not support mutation. )NotImplementedErrortype__name___help_mutation)selfargskwargss      Z/var/www/html/ai-engine/env/lib/python3.11/site-packages/torch/fx/immutable_collections.py_no_mutationr      s0    
UDJJUU^UU      c                 p    t          d| j        z   | fi           }|D ]}t          ||t                     |S )N
immutable_)r   r   setattrr   )basemutable_functions	containerattrs       r   _create_immutable_containerr'   "   sF    \DM1D7B??I! / /	4....r   )__delitem____iadd____imul____setitem__appendclearextendinsertpopremovereversesortc                 J    t           t          t          |                     ffS N)r   tupleiterr   s    r   <lambda>r9   :   s    .5d;L;L:N)O r   c                 :    t          t          |                     S r5   )hashr6   r8   s    r   r9   r9   ;   s    tE$KK'8'8 r   T)is_backward_compatible)r(   __ior__r+   r-   r0   popitem
setdefaultupdatec                 T    t           t          |                                           ffS r5   )r   r7   itemsr8   s    r   r9   r9   L   s    .4

;M;M:O)P r   c                 ^    t          t          |                                                     S r5   )r;   r6   rB   r8   s    r   r9   r9   M   s    tE$**,,,?,?'@'@ r   dreturnc                      t          |           S r5   )r   rD   s    r   _immutable_dict_flattenrH   R       r   valuescontextc                 <    t          t          | |                    S r5   )r   r
   rJ   rK   s     r   _immutable_dict_unflattenrN   V        /&'::;;;r   c                      t          |           S r5   )r   rG   s    r   _immutable_list_flattenrQ   ]   rI   r   c                 <    t          t          | |                    S r5   )r   r   rM   s     r   _immutable_list_unflattenrS   a   rO   r   z-torch.fx.immutable_collections.immutable_dict)serialized_type_nameflatten_with_keys_fnz-torch.fx.immutable_collections.immutable_listN)typingr   r   r   r   r   torch.utils._pytreer   r	   r
   r   r   r   r   r   _compatibilityr   __all__r   r   r'   listr   
__reduce____hash__dictr   rH   rN   rQ   rS    r   r   <module>r_      s   3 3 3 3 3 3 3 3 3 3 3 3 3 3	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 * ) ) ) ) ) -
.     -, " PO 88  *T * * *> : : :,,	  QP @@  *T * * *> : : :tCH~ %S	78J2K    <SM<< 
#s(^< < < <tCy U49g3E-F    <SM<< 
#Y< < < <  H0     H0     r   