
    ȅiB                         S r SSKrSSKJr  SSKJr  SSKJr  SS/r\" \R                  S	S
9SS\S-  S\	S-  S\4S jj5       r\" \R                  S	S
9S\S-  SS4S j5       r
g)z 
Python polyfills for traceback
    N)StackSummary)TracebackType   )substitute_in_graph
extract_tbclear_framesT)can_constant_fold_throughtblimitreturnc                 L   U c  [         R                  R                  / 5      $ / nU b_  U(       a,  [        U5      U:  a  UR	                  U R
                  5        OO,UR	                  U R
                  5        U R                  n U b  M_  [         R                  R                  U5      $ N)	tracebackr   	from_listlenappendframe_summarytb_next)r
   r   r   s      [/home/james-whalen/.local/lib/python3.13/site-packages/torch/_dynamo/polyfills/traceback.pyr   r      s    	z%%//33M
.=!E)$$$$
   !1!12ZZ . !!++M::    c                     g r    )r
   s    r   r   r   #   s     r   r   )__doc__r   r   typesr   
decoratorsr   __all__r   intr   r   r   r   <module>r      s     "  , 
( Y))TJ;=4' ;d
 ;l ; K;& Y++tL]T) d  Mr   