
    %Vji+                         d dl mZmZ d dlmZmZ d dlmZmZ d dl	m
Z
 ddlmZ  eed          d	ed
ee
gef         defd            Z eed          d	ed
eegef         defd            ZddgZdS )    )AnyCallable)_fx_map_aggregate_fx_map_arg)immutable_dictimmutable_list)Node   )substitute_in_graphT)can_constant_fold_throughafnreturnc                 *    t          | fd          S )Nc                 H    t          | t                    r |           n| S N)
isinstancer	   )xr   s    T/root/voice-cloning/.venv/lib/python3.11/site-packages/torch/_dynamo/polyfills/fx.py<lambda>zmap_arg.<locals>.<lambda>   s"    z!T/B/B&Ibbeee     map_aggregate)r   r   s    `r   map_argr   
   s    IIIIJJJr   c                 p   t          | t                    r@fd| D             }t          | d          r t          |           | nt          |          }nt          | t                    rt          fd| D                       }nt          | t                    r.t          fd|                                 D                       }nkt          | t                    rKt          t          | j                  t          | j                  t          | j                            }n |           }|S )Nc              3   8   K   | ]}t          |          V  d S r   r   .0elemr   s     r   	<genexpr>z map_aggregate.<locals>.<genexpr>   s-      44$mD"%%444444r   _fieldsc                 0    g | ]}t          |          S  r   r   s     r   
<listcomp>z!map_aggregate.<locals>.<listcomp>   s#     G G GTtR!8!8 G G Gr   c                 :    g | ]\  }}|t          |          fS r#   r   )r   kvr   s      r   r$   z!map_aggregate.<locals>.<listcomp>   s,     Q Q Qtq!!]1b%9%9!: Q Q Qr   )r   tuplehasattrtypelistr   dictr   itemsslicer   startstopstep)r   r   itresults    `  r   r   r      s4    !U 4444!444!(I!6!6Ea"E"II	At		  G G G GQ G G GHH	At		 	 Q Q Q Qqwwyy Q Q QRR	Au		 !'2&&!&"%%!&"%%
 
 AMr   r   r   N)typingr   r   torch._Cr   r   torch.fx.immutable_collectionsr   r   torch.fx.noder	   
decoratorsr   r   r   __all__r#   r   r   <module>r:      s0                   3 3 3 3 3 3 3 3 I I I I I I I I       , , , , , , [DAAAKs K$- K# K K K BAK &$GGGS hucz2 s    HG, r   