
    a,jr\                        d Z ddlZddlZddlmZmZ ddlmZmZ ddl	m
Z
mZmZ ddlmZmZmZmZ ddlmZmZmZmZmZ d	d
lmZmZ d	dlmZ erddlmZ ddlm Z  dZ! G d de          Z" G d de          Z# G d de#          Z$ G d de#          Z% G d de#          Z& G d de#          Z' G d de'          Z( G d de#          Z)dS )a  
This module provides iterator-related variable tracking functionality for Dynamo.
It implements variable classes for handling Python iterators and itertools functions
during symbolic execution and tracing.

The module includes:
- Base iterator variable classes for tracking iterator state
- Implementations of built-in iterators (zip, map, filter)
- Support for itertools functions (product, accumulate, combinations, etc.)
- Mutation tracking and reconstruction capabilities for iterator operations

These classes integrate with Dynamo's variable tracking system to enable proper
handling of iterator operations during code transformation and optimization.
    N)CallableSequence)AnyTYPE_CHECKING   )graph_break_hints	polyfills	variables)create_build_tuplecreate_call_functioncreate_call_function_excreate_instruction)handle_observed_exceptionObservedUserStopIterationraise_observed_exceptionunimplemented	UserError   )ValueMutationNewVariableTracker)ConstantVariable)	PyCodegen)InstructionTranslatori  c                   x     e Zd Zdededdf fdZdefdZdefdZdefdZd	d
de	d         ddddf fdZ
 xZS )ItertoolsVariablevaluekwargsreturnNc                 H     t                      j        di | || _        d S N )super__init__r   )selfr   r   	__class__s      \/var/www/html/banglarbhumi/venv/lib/python3.11/site-packages/torch/_dynamo/variables/iter.pyr#   zItertoolsVariable.__init__0   s+    ""6"""


    c                     d| j          dS )NzItertoolsVariable()r   r$   s    r&   __repr__zItertoolsVariable.__repr__4   s    1DJ1111r'   c                     | j         S Nr*   r+   s    r&   as_python_constantz$ItertoolsVariable.as_python_constant7   
    zr'   c                     | j         S r.   r*   r+   s    r&   get_real_python_backed_valuez.ItertoolsVariable.get_real_python_backed_value:   r0   r'   txr   argsr   zdict[str, VariableTracker]c                      j         t          j        u rt          d D                       rat	          dd  d d dd                    t                                                    dhz
             g t          j	                   dv rd         
                                }nd	}fd
D             }d t          j        |d|iD             }t          j        |t                                S  j         t          j        u rst                    dk    rډd                                       rd	                                         rd                                       }d	         
                                }g }t          j        ||          D ]6}|                    t          j        t+          |                               7t          j        |t                                S  j         t          j        u r]t          d D                       rat	          dd  d d dd                    t                                                    dhz
             g t          j	                   dt.          dt0          f fdt                    d	k    r7d                                       rd                                       }	n0t	          dd  d d d d ddgt          j                   dv rdt.          dt0          ffd}
ndt.          dt0          ffd}
g }	 t          j        |	|
          D ]\  }}|                    t          j        t          j                            |          rt          j                            |          n|t          j        t+          |          t                                gt                                           n@# t:          $ r3}t	          dd  d d dg t          j        |            Y d }~nd }~ww xY wt          j        |t                                S  j         t          j        u rdt                    dk     rt          j        d!t                      iS                      t/          j!        tD          j                            S  j         t          j#        u r։st                    dk    r!t          j$        t                                S t                    d	k    r(t          j$        d         t                      "          S t                    dk    r/t          j$        d         d	         t                      #          S tK                      &                              S  j         t          j'        u rt                    d	k    s-t                    dk    rd	                                         rst                    dk    rd	         
                                }nd }d$ t          j'        d         (                              |          D             }t          j        |t                                S tK                      &                              S )%Nc              3   "   K   | ]
}|d k    V  dS )repeatNr!   .0kws     r&   	<genexpr>z2ItertoolsVariable.call_function.<locals>.<genexpr>F   s&      33b2>333333r'   z(Unsupported kwargs for itertools.productcall_function  z#Expected kwargs: 'repeat', but got ,r7   gb_typecontextexplanationhintsr   c                 :    g | ]}|                               S r!   )force_unpack_var_sequence)r9   argr3   s     r&   
<listcomp>z3ItertoolsVariable.call_function.<locals>.<listcomp>S   s'    FFF#C11"55FFFr'   c                 P    g | ]#}t          j        t          |                    $S r!   r
   TupleVariablelistr9   items     r&   rG   z3ItertoolsVariable.call_function.<locals>.<listcomp>T   s9        'T

33  r'   )mutation_typer   r   c              3   "   K   | ]
}|d k    V  dS )keyNr!   r8   s     r&   r;   z2ItertoolsVariable.call_function.<locals>.<genexpr>n   s&      0022;000000r'   z(Unsupported kwargs for itertools.groupbyz Expected kwargs: 'key', but got rP   r   c           
      @   t          | t          j                  r|                                 S |                                 r|                                 S t          dd d d dt          t          |                      dg t          j
                   d S )Nz*Unsupported key type for itertools.groupbyr<   r=   zCDynamo does not know how to trace itertools.groupby with key type: zJ. We only support grouping keys that are constants (int, float, str, etc.)r?   )
isinstancer
   SymNodeVariableevaluate_expris_python_constantr/   r   strtyper   SUPPORTABLE)rP   r4   r   r$   s    r&   retrieve_const_keyz;ItertoolsVariable.call_function.<locals>.retrieve_const_keyw   s    c9#<== ,,...++-- 
11333! L G G G G Gv G G%c<?S		NN%c %c %c ? 1 =>     r'   z+Unsupported arguments for itertools.groupbyz?Dynamo does not know how to trace itertools.groupby with args: z and kwargs: ze. itertools.groupby expects an iterable to group and an optional key function to determine groupings.z9Make sure the arguments to itertools.groupby are correct.xc                 l                          d                              | gi                     S )NrP   )getcall_function)rZ   r   rY   r3   s    r&   keyfuncz0ItertoolsVariable.call_function.<locals>.keyfunc   s;    --

5))77QCDD  r'   c                      |           S r.   r!   )rZ   rY   s    r&   r^   z0ItertoolsVariable.call_function.<locals>.keyfunc   s    --a000r'   )rP   z7Unexpected failure during itertools.groupby() iterationz6Unexpected failure in invoking function during groupby)r@   rA   rB   rC   from_excrN   )rM   rN   )rM   steprN   c                 P    g | ]#}t          j        t          |                    $S r!   rI   rL   s     r&   rG   z3ItertoolsVariable.call_function.<locals>.<listcomp>   s9        'T

33  r'   ))r   	itertoolsproductanyr   joinsetkeysr   
USER_ERRORr/   r
   ListIteratorVariabler   combinationslenhas_unpack_var_sequencerU   unpack_var_sequenceappendrJ   rK   groupbyr   r   rX   r   
is_literalcreate	Exceptionr7   RepeatIteratorVariableinline_user_function_returnbuildr	   countCountIteratorVariabler"   r]   permutationsrE   )r$   r3   r4   r   rseqsitemsiterablerM   seqr^   resultkverY   r%   s   ````           @r&   r]   zItertoolsVariable.call_function=   s    :***33F33333 FCTCCDCC6CC!CxxFKKMM 2 2hZ ?@@!C !C9-89    6!!8$7799FFFFFFFD %-t>A>>  E 1.00   
 J)000 1D		QQ//33 Q**,,  Aw22266HQ**,,AE!.x;; B BY4T$ZZ@@AAAA1.00    Z9,,,0000000 FCTCCDCC6CC!@xxFKKMM 2 2eW <==!@ !@9-89    C         4yyA~~$q'"A"A""E"E~1g11"55ICTCCDCC6CC!D48!D !DGM!D !D !D
 T*6     3         1 13 1 1 1 1 1 1 F%-cw???  DAqMM!/ (1'A'L'LQ'O'O%+I$>$E$Ea$H$H$H)* ) >$(GG;K;M;M!" !" !"	 +;*<*<          UCTCCDCC6CC X:-9:         1.00    Z9+++4yy1}} 7)9););   11%b)*:;;T6   Z9?**6*4yyA~~ 6EUEWEWXXXX4yyA~~ 6a0@0B0B    4yyA~~ 6aa"2"4"4   
 77((T6:::J)000TaCIINNtAw7Q7Q7S7SN %3 4yyA~~G..00 %2G55b991   E 1.00   
 77((T6:::s   B>P 
Q)Q		Q)__name__
__module____qualname__r   r#   rV   r,   r/   r2   r   r]   __classcell__r%   s   @r&   r   r   /   s        c S T      2# 2 2 2 2C    c    n;#n; ()n; -	n;
 
n; n; n; n; n; n; n; n; n; n;r'   r   c            
            e Zd Zdeddf fdZdddefdZdddee         fdZddd	e	egef         ddfd
Z
dddefdZdddeddf fdZdddedee         deeef         def
 fdZ xZS )IteratorVariabler   r   Nc                 :     t                      j        di | d S r    )r"   r#   )r$   r   r%   s     r&   r#   zIteratorVariable.__init__   s&    ""6"""""r'   r3   r   c                 L    t          dd|  ddg t          j                   d S )NzUnimplemented next() callznext(r)   z(This abstract method must be implementedr?   )r   r   
DYNAMO_BUGr$   r3   s     r&   next_variablezIteratorVariable.next_variable   s@    /#DOOOB1%01		
 	
 	
 	
 	
 	
r'   c                 @    g }|                      ||j                   |S r.   )force_apply_to_var_sequencero   )r$   r3   r   s      r&   rE   z*IteratorVariable.force_unpack_var_sequence   s&     )+((V];;;r'   fnc                     	 	  ||                      |                     n # t          $ r t          |           Y d S w xY wAr.   )r   r   r   )r$   r3   r   s      r&   r   z,IteratorVariable.force_apply_to_var_sequence  sb    	4%%b))****,   )"---	s   " ??c                     dS NTr!   r   s     r&   has_force_unpack_var_sequencez.IteratorVariable.has_force_unpack_var_sequence  s    tr'   namer   c                     |dk    s|dk    rt           j                            d          S t                                          ||          S )N__iter____next__T)r
   r   rr   r"   call_obj_hasattr)r$   r3   r   r%   s      r&   r   z!IteratorVariable.call_obj_hasattr  sK     :!3!3-44T:::ww''D111r'   r4   c                     |dk    r| S |dk    r|                      |          S t                                          ||||          S )Nr   r   )r   r"   call_method)r$   r3   r   r4   r   r%   s        r&   r   zIteratorVariable.call_method  sR     :KZ%%b)))ww""2tT6:::r'   )r   r   r   r   r#   r   r   rK   rE   r   r   boolr   rV   r   dictr   r   r   s   @r&   r   r      s       # # # # # # # #
 7 
O 
 
 
 
)	o	   )/7s
/C	   0G D    2)2142	2 2 2 2 2 2;#; ; ?#	;
 S/)*; 
; ; ; ; ; ; ; ; ; ;r'   r   c                   @     e Zd ZdZdededdf fdZdddefd	Z xZS )
ObjectIteratorVariableaZ  
    VariableTracker for iter(obj) that implements the iterator protocol (i.e.,
    has a `__next__` method).

    We use this class to track the state of the iterator and handle the case
    when the iterator is exhausted:

    Example usage:
        > b = iter(obj)
        > list(b)  # exhaust the iterator
        > list(b)  # empty list
    objr   r   Nc                 V     t                      j        di | || _        d| _        d S )NFr!   )r"   r#   r   generator_exhausted)r$   r   r   r%   s      r&   r#   zObjectIteratorVariable.__init__7  s5    ""6"""#(   r'   r3   r   c                     | j         rt          t          |           	 | j                            |          S # t
          $ r	 d| _          w xY wr   )r   r   StopIterationr   r   r   r   s     r&   r   z$ObjectIteratorVariable.next_variable<  s`    # 	8$]B777	8))"---( 	 	 	 (,D$		s	   8 A)	r   r   r   __doc__r   r   r#   r   r   r   s   @r&   r   r   )  s         )O )s )t ) ) ) ) ) )

 7 
O 
 
 
 
 
 
 
 
r'   r   c                   P     e Zd Zdededdf fdZdefdZdddefd	ZddZ	 xZ
S )rt   rM   r   r   Nc                 H     t                      j        di | || _        d S r    )r"   r#   rM   )r$   rM   r   r%   s      r&   r#   zRepeatIteratorVariable.__init__J  s+    ""6"""			r'   c                     t           j        S r.   )rc   r7   r+   s    r&   python_typez"RepeatIteratorVariable.python_typeN  s    r'   r3   r   c                     | j         S r.   )rM   r   s     r&   r   z$RepeatIteratorVariable.next_variableR  s
    yr'   codegenr   c                                          fd            | j                                       t          dd                     d S )Nc                                                                 t                                         d          g          S )Nr7   extend_outputcreate_load_python_modulerc   create_load_attrr   s   r&   <lambda>z4RepeatIteratorVariable.reconstruct.<locals>.<lambda>W  s>    G))55i@@,,X66  r'   r   F)add_push_nullrM   r   r   r$   r   s    `r&   reconstructz"RepeatIteratorVariable.reconstructU  sh       	
 	
 	
 		21e<<=====r'   r   r   r   N)r   r   r   r   r   r#   rW   r   r   r   r   r   s   @r&   rt   rt   I  s        _         T         7 O    
> 
> 
> 
> 
> 
> 
> 
>r'   rt   c                        e Zd Zdhej        ZdefdZ	 	 	 ddeez  deez  dede	dd	f
 fd
Z
dddefdZddZ xZS )rx   advance_countr   c                     t           j        S r.   )rc   rw   r+   s    r&   r   z!CountIteratorVariable.python_typej  s
    r'   r   r   rM   ra   r   Nc                     t                      j        di | t          |t                    st	          j        |          }t          |t                    st	          j        |          }|| _        || _        || _        d S r    )	r"   r#   rR   r   r   rr   rM   ra   r   )r$   rM   ra   r   r   r%   s        r&   r#   zCountIteratorVariable.__init__m  s     	""6"""$00 	1#*400D$00 	1#*400D		*r'   r3   r   c                     |                                  sJ | j        }|j        j                            |            | j                            |d| j        gi           | _        | xj        dz  c_        |S )N__add__r   )
is_mutablerM   outputside_effectsmutationr   ra   r   )r$   r3   old_items      r&   r   z#CountIteratorVariable.next_variable}  sr         9
	''---I))"i$)bII	ar'   r   r   c                                          fd            | j                    | j                                       t	          dd                     d S )Nc                                                                 t                                         d          g          S )Nrw   r   r   s   r&   r   z3CountIteratorVariable.reconstruct.<locals>.<lambda>  s>    G))55i@@,,W55  r'   r   F)r   rM   ra   r   r   r   s    `r&   r   z!CountIteratorVariable.reconstruct  sz       	
 	
 	
 			21e<<=====r'   )r   r   r   r   )r   r   r   r   _nonvar_fieldsrW   r   intr   r   r#   r   r   r   r   s   @r&   rx   rx   b  s         			(N
T    
 '(&'	+ +O#+ O#+ 	+
 + 
+ + + + + +  7 O    > > > > > > > >r'   rx   c            	            e Zd ZdZeZddhej        Z	 ddee	         de
deddf fd	Zdee         fd
Zddde
fdZddded         fdZddde	fdZddZddZ xZS )ZipVariablez$
    Represents zip(*iterables)
    indexstrictF	iterablesr   r   Nc                      t                      j        di | t          |t                    sJ || _        d| _        || _        d S Nr   r!   )r"   r#   rR   rK   r   r   r   )r$   r   r   r   r%   s       r&   r#   zZipVariable.__init__  sQ     	""6""")T*****"
r'   c                     t           S r.   )zipr+   s    r&   r   zZipVariable.python_type      
r'   r3   r   c                 D    t          fd| j        D                       S )Nc              3   l   K   | ].}t          |t                    p|                              V  /d S r.   )rR   rK   rm   )r9   itr3   s     r&   r;   z6ZipVariable.has_unpack_var_sequence.<locals>.<genexpr>  sT       
 
 r4  BB$>$>r$B$B
 
 
 
 
 
r'   )allr   r   s    `r&   rm   z#ZipVariable.has_unpack_var_sequence  s=     
 
 
 
n
 
 
 
 
 	
r'   r   c                 \   |                      |          sJ g }| j        D ]b}t          |t                    r#|                    || j        d                     :|                    |                    |                     c| j        r	d| j        ini }t          |i |}d |D             S )Nr   c                 P    g | ]#}t          j        t          |                    $S r!   rI   )r9   vars     r&   rG   z3ZipVariable.unpack_var_sequence.<locals>.<listcomp>  s)    EEEs	'S		22EEEr'   )	rm   r   rR   rK   ro   r   rn   r   r   )r$   r3   r   r   r   zippeds         r&   rn   zZipVariable.unpack_var_sequence  s     ++B/////	. 	= 	=B"d## =  DJLL!12222  !7!7!;!;<<<<,0K?(DK((Ri*6**EEfEEEEr'   c                    |                                  sJ t          | j                  dk    rt          t                     | j        g }dt          t                   t          z  dt          ffd}d }	 t          | j                  D ]#\  }}|	                     ||                     $ny# t          $ rl | j        rc|dk    r8| j        D ]/}	  ||           n# t          $ r t                     Y *w xY w n t                     t          t          d          d  w xY wj        j                            |            | xj        dz  c_        t%          j        |          S )Nr   r   r   c                     t          | t                    r0t          |           k    rt          t                     |          S |                               S r.   )rR   rK   rl   r   r   r   )r   	old_indexr3   s    r&   get_itemz+ZipVariable.next_variable.<locals>.get_item  sV     "d## ,B'',]B???)}$''+++r'   z3zip() has one argument of len differing from othersr   )r   rl   r   r   r   r   rK   r   	enumeratero   r   r   r   r   
ValueErrorr   r   r   r
   rJ   )r$   r3   r4   r   idxr   r   s    `    @r&   r   zZipVariable.next_variable  s        t~!##$]B777J		,_%7	,	, 	, 	, 	, 	, 	, 	, 	$T^44 * *RHHRLL))))*( 	 	 	{ !88"n 
 
%$HRLLLL8 % % %5b999$H%  )"---I   )	, 		''---

a

&t,,,s0   :8B3 3 D)C D) C<9D);C<<-D)r   r   c                    | j         D ]v}t          |t                    rT|| j        d          }|                    |           |                    t          t          |                               k ||           wd S r.   )r   rR   rK   r   foreachappend_outputr   rl   )r$   r   r   remaining_itemss       r&   reconstruct_itemszZipVariable.reconstruct_items  s    . 	 	B"d## "$TZ\\"2000%%&8_9M9M&N&NOOOO	 	r'   c                                         fdd           |                                                    t          t	          | j                                                                               d                              | j                  t          dd          gt          dd                     d S )	Nc                  0                          dd          S )Nbuiltinsr   load_import_fromr   s   r&   r   z)ZipVariable.reconstruct.<locals>.<lambda>      G,,Z?? r'   Tcall_function_exr   	BUILD_MAPr   rF   F)r   r   r   r   rl   r   r   create_load_constr   r   r   r   s    `r&   r   zZipVariable.reconstruct  s    ????RV 	 	
 	
 	
 	w'''0T^1D1DEEFFF))(33))$+66";A666 )u55		
 	
 	
 	
 	
r'   )Fr   )r   r   r   r   r   _cpython_typer   r   rK   r   r   r   r#   rW   r   rm   rn   r   r   r   r   r   s   @r&   r   r     s]        
 M 	 
	(N  (  	
 
     T#Y    
*A 
d 
 
 
 
F)F		 F F F F/- 7 /-O /- /- /- /-b   
 
 
 
 
 
 
 
r'   r   c                   |     e Zd ZdZeZdedee         deddf fdZ	de
fdZd	d
defdZd	d
def fdZddZ xZS )MapVariablez(
    Represents map(fn, *iterables)
    r   r   r   r   Nc                 J     t                      j        |fi | || _        d S r.   )r"   r#   r   )r$   r   r   r   r%   s       r&   r#   zMapVariable.__init__  s/     	--f---r'   c                     t           S r.   )mapr+   s    r&   r   zMapVariable.python_type   r   r'   r3   r   c                     dS )NFr!   r   s     r&   rm   z#MapVariable.has_unpack_var_sequence#  s    ur'   c                     t                                          |          }| j                            ||j        i           S r.   )r"   r   r   r]   r|   )r$   r3   r4   r%   s      r&   r   zMapVariable.next_variable&  s6    ww$$R((w$$RR888r'   r   r   c                 D                        fdd            | j                   |                                                    t	          t          | j                  dz                        | j        r~t          j	        dk    s
J d            
                                        d                              | j                  t          dd	          gt          dd
                     d S 
                    t          d
d
                     d S )Nc                  0                          dd          S )Nr   r   r   r   s   r&   r   z)MapVariable.reconstruct.<locals>.<lambda>,  r   r'   Tr   r   )      z6Unexpected bug: map(strict=True) requires Python 3.14+r   r   r   F)r   r   r   r   r   rl   r   r   sysversion_infor   r   r   r   r   s    `r&   r   zMapVariable.reconstruct*  sE   ????RV 	 	
 	
 	
 	w'''0T^1D1Dq1HIIJJJ; 	I#w...H /.. !!--h77--dk::&{::: -T599	     !!"9%"G"GHHHHHr'   r   )r   r   r   r   r   r   r   rK   r   r#   rW   r   r   rm   r   r   r   r   s   @r&   r   r     s         
 M ( 	
 
     T    *A d    9 7 9O 9 9 9 9 9 9I I I I I I I Ir'   r   c                        e Zd ZdZeZdhej        Zdede	e         de
ddf fdZdefd	Zd
ddefdZd
dde	d         fdZd
ddefdZddZddZ xZS )FilterVariablez)
    Represents filter(fn, iterable)
    r   r   r}   r   r   Nc                 d     t                      j        di | || _        || _        d| _        d S r   )r"   r#   r   r}   r   )r$   r   r}   r   r%   s       r&   r#   zFilterVariable.__init__N  s;     	""6""" 


r'   c                     t           S r.   )filterr+   s    r&   r   zFilterVariable.python_typeY  s    r'   r3   r   c                 j    t          | j        t                    p| j                            |          S r.   )rR   r}   rK   rm   r   s     r&   rm   z&FilterVariable.has_unpack_var_sequence\  s2    $-.. 
$-2W2W3
 3
 	
r'   r   c                 *   |                      |          sJ d }t          | j        t                    r| j        | j        d          }n| j                            |          }| j                            ||i           }t          j	        |g          gS r.   )
rm   rR   r}   rK   r   rn   r   r]   r
   rJ   )r$   r3   r   filtereds       r&   rn   z"FilterVariable.unpack_var_sequencea  s     ++B/////dmT** 	7tz||,BB22266B7((R44'
3344r'   c                 `    dt           f fd}	  |            } xj        dz  c_         j                                        r|}n j                            |gi           }t          j        t          j                                      |gi           }|	                                r|S )Nr   c                      j         } t          j        t                    r:| t	          j                  k    rt          t                     j        |          S j                                      S r.   )r   rR   r}   rK   rl   r   r   r   )r   r$   r3   s    r&   _nextz+FilterVariable.next_variable.<locals>._nextn  sf    
I$-.. 7DM 2 222,]B???}Y//}222666r'   Tr   )
r   r   r   is_constant_noner]   r
   UserFunctionVariabler	   	predicater/   )r$   r3   r	  rM   respred_ress   ``    r&   r   zFilterVariable.next_variablem  s    	7 	7 	7 	7 	7 	7 	7 	7	577DJJ!OJJw'')) <g++B;; 5# mBr**  **,, 	r'   r   r   c                    t          | j        t                    rZ| j        | j        d          }|                    |           |                    t          t          |                               d S  || j                   d S r.   )rR   r}   rK   r   r   r   r   rl   )r$   r   r   s      r&   r   z FilterVariable.reconstruct_items  s}    dmT** 	#"mDJLL9OOOO,,,!!"4S5I5I"J"JKKKKKGDM"""""r'   c                                          fd            | j                   |                                                    t	          dd                     d S )Nc                  0                          dd          S )Nr   r  r   r   s   r&   r   z,FilterVariable.reconstruct.<locals>.<lambda>  s    g&>&>z8&T&T r'   r   F)r   r   r   r   r   r   s    `r&   r   zFilterVariable.reconstruct  sl    TTTTUUUw'''21e<<=====r'   r   )r   r   r   r   r  r   r   r   r   rK   r   r#   rW   r   r   rm   rn   r   r   r   r   r   s   @r&   r   r   A  sC        
 M 			(N
		 '	 		
 
	 	 	 	 	 	T    
*A 
d 
 
 
 


5)
5		 
5 
5 
5 
5 7 O    0# # # #> > > > > > > >r'   r   )*r   rc   r   collections.abcr   r   typingr   r    r   r	   r
   bytecode_transformationr   r   r   r   excr   r   r   r   r   baser   r   constantr   torch._dynamo.codegenr   torch._dynamo.symbolic_convertr   MAX_ITERATOR_LIMITr   r   r   rt   rx   r   r   r   r!   r'   r&   <module>r     s        



 . . . . . . . . % % % % % % % % 6 6 6 6 6 6 6 6 6 6                         4 3 3 3 3 3 3 3 & & & & & &  E//////DDDDDD   |; |; |; |; |; |; |; |;~8; 8; 8; 8; 8; 8; 8; 8;v    -   @> > > > >- > > >2.> .> .> .> .>, .> .> .>by
 y
 y
 y
 y
" y
 y
 y
x/I /I /I /I /I+ /I /I /IdP> P> P> P> P>% P> P> P> P> P>r'   