a
    h                     @   s   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 dZeejefeee
gef ee
 eedddZdS )z 
Python polyfills for functools
    N)Iterable)CallableTypeVar   )substitute_in_graphreduce_T_Uc                   @   s   e Zd ZdS )_INITIAL_MISSINGN)__name__
__module____qualname__ r   r   O/var/www/auris/lib/python3.9/site-packages/torch/_dynamo/polyfills/functools.pyr
      s   r
   )functioniterableinitialreturnc                C   sX   t |}|tu r<zt|}W q@ ty8   tdd Y q@0 n|}|D ]}| ||}qD|S )Nz0reduce() of empty iterable with no initial value)iterr
   nextStopIteration	TypeError)r   r   r   itvalueelementr   r   r   r      s    
)__doc__	functoolscollections.abcr   typingr   r   Z
decoratorsr   __all__r   r	   r
   r   r   r   r   r   <module>   s    