
    %Vji              
           d Z ddlZddlmZ ddlmZmZ ddlmZ dgZ	 ed          Z
 ed	          Z G d
 d          Z eej                  efdeee
gef         dee
         dedefd            ZdS )z 
Python polyfills for functools
    N)Iterable)CallableTypeVar   )substitute_in_graphreduce_T_Uc                       e Zd ZdS )_INITIAL_MISSINGN)__name__
__module____qualname__     [/root/voice-cloning/.venv/lib/python3.11/site-packages/torch/_dynamo/polyfills/functools.pyr   r      s        Dr   r   functioniterableinitialreturnc                    t          |          }|t          u r/	 t          |          }n # t          $ r t	          d          d w xY w|}|D ]} | ||          }|S )Nz0reduce() of empty iterable with no initial value)iterr   nextStopIteration	TypeError)r   r   r   itvalueelements         r   r   r      s     
hB """	HHEE 	 	 	B 	
  ) )((Ls	   * A)__doc__	functoolscollections.abcr   typingr   r   
decoratorsr   __all__r	   r
   r   r   r   r   r   <module>r%      s        $ $ $ $ $ $ $ $ $ $ $ $ $ $ , , , , , , * WT]]WT]]	 	 	 	 	 	 	 	
 Y%&& # Bx|$rl 
    '&  r   