
    ȅiCW                     z   S r SSKrSSKrSSKJrJr  SSKJrJrJ	r	  SSK
JrJrJr  SSKJrJrJrJr  SSKJrJrJrJrJr  S	S
KJrJr  S	SKJr  \(       a  SSKJr  SSK J!r!  Sr" " S S\5      r# " S S\5      r$ " S S\$5      r% " S S\$5      r& " S S\$5      r' " S S\$5      r( " S S\(5      r) " S S\$5      r*g)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Union   )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                   z   ^  \ rS rSrS\S\SS4U 4S jjrS\4S jrS\4S jrS	S
S\	S   SSSS4U 4S jjr
SrU =r$ )ItertoolsVariable/   valuekwargsreturnNc                 2   > [         TU ]  " S0 UD6  Xl        g N )super__init__r   )selfr   r   	__class__s      V/home/james-whalen/.local/lib/python3.13/site-packages/torch/_dynamo/variables/iter.pyr%   ItertoolsVariable.__init__0   s    "6"
    c                 "    SU R                    S3$ )NzItertoolsVariable()r   r&   s    r(   __repr__ItertoolsVariable.__repr__4   s    #DJJ<q11r*   c                     U R                   $ Nr-   r.   s    r(   as_python_constant$ItertoolsVariable.as_python_constant7   s    zzr*   txr   argsr   zdict[str, VariableTracker]c                 j  >^ ^^^^ T R                   [        R                  L Ga  [        S T 5       5      (       aR  [	        SST  ST ST 3SSR                  [        TR                  5       5      S1-
  5       3/ [        R                  QS9  ST;   a  TS   R                  5       nOS	nT Vs/ s H  oUR                  T5      PM     nn[        R                  " USU06 Vs/ s H"  n[        R                  " [        U5      5      PM$     nn[        R                  " U[!        5       S
9$ T R                   [        R"                  L a  T(       d  [%        T5      S:X  a  TS   R'                  T5      (       a  TS	   R)                  5       (       a  TS   R+                  T5      n	TS	   R                  5       n/ n[        R"                  " X5       H1  nUR-                  [        R                  " [        U5      5      5        M3     [        R                  " U[!        5       S
9$ T R                   [        R.                  L Ga  [        S T 5       5      (       aR  [	        SST  ST ST 3SSR                  [        TR                  5       5      S1-
  5       3/ [        R                  QS9  S[0        S[2        4UUU 4S jjm[%        T5      S	:X  a.  TS   R'                  T5      (       a  TS   R+                  T5      n
O-[	        SST  ST ST 3ST ST S3S/[        R4                  QS9  ST;   a  S[0        S[2        4UUU4S jjnOS[0        S[2        4U4S jjn/ n [        R.                  " W
US9 H  u  pUR-                  [        R                  " [        R6                  R9                  U5      (       a  [        R6                  R;                  U5      OU[        R                  " [        U5      [!        5       S
9/[!        5       S
95        M     [        R                  " U[!        5       S
9$ T R                   [        R>                  L ac  [%        T5      S:  a  [        R@                  " TS[!        5       06$ TRC                  [0        RD                  " T[F        R>                  5      TT5      $ T R                   [        RH                  L a  [        RJ                  " TS[!        5       06$ T R                   [        RL                  L a  [%        T5      S	:X  d'  [%        T5      S:X  a  TS	   R)                  5       (       a  T(       d  [%        T5      S:X  a  TS	   R                  5       nOS n[        RL                  " TS   R                  T5      U5       Vs/ s H"  n[        R                  " [        U5      5      PM$     nn[        R                  " U[!        5       S
9$ [N        TT ]  TTT5      $ s  snf s  snf ! [<         a1  n[	        SST  ST ST 3S/ [        R4                  QUS9   S nAGNS nAff = fs  snf ) Nc              3   *   #    U  H	  oS :g  v   M     g7f)repeatNr#   .0kws     r(   	<genexpr>2ItertoolsVariable.call_function.<locals>.<genexpr>C   s     3Fb>F   z(Unsupported kwargs for itertools.productcall_function  z#Expected kwargs: 'repeat', but got ,r9   gb_typecontextexplanationhintsr   )mutation_typer   r   c              3   *   #    U  H	  oS :g  v   M     g7f)keyNr#   r:   s     r(   r=   r>   k   s     02;r?   z(Unsupported kwargs for itertools.groupbyz Expected kwargs: 'key', but got rJ   r    c           
      $  > [        U [        R                  5      (       a  U R                  5       $ U R	                  5       (       a  U R                  5       $ [        SST ST ST 3S[        [        U 5      5       S3/ [        R                  QS9  g )Nz*Unsupported key type for itertools.groupbyr@   rA   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.)rC   )
isinstancer   SymNodeVariableevaluate_expris_python_constantr3   r   strtyper	   SUPPORTABLE)rJ   r6   r   r&   s    r(   retrieve_const_key;ItertoolsVariable.call_function.<locals>.retrieve_const_keyt   s    c9#<#<==,,..++--1133! L"0avQvh G%<<?S	N;K L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                 V   > T" TR                  S5      R                  TU /0 5      5      $ )NrJ   )getcall_function)rU   r   rS   r5   s    r(   keyfunc0ItertoolsVariable.call_function.<locals>.keyfunc   s-    -

5)77QCD r*   c                    > T" U 5      $ r2   r#   )rU   rS   s    r(   rY   rZ      s    -a00r*   )rJ   z7Unexpected failure during itertools.groupby() iterationz6Unexpected failure in invoking function during groupby)rD   rE   rF   rG   from_excrH   ))r   	itertoolsproductanyr   joinsetkeysr	   
USER_ERRORr3   force_unpack_var_sequencer   TupleVariablelistListIteratorVariabler   combinationslenhas_unpack_var_sequencerO   unpack_var_sequenceappendgroupbyr   r   rR   r   
is_literalcreate	Exceptionr9   RepeatIteratorVariableinline_user_function_returnbuildr
   countCountIteratorVariablepermutationsr$   rX   )r&   r5   r6   r   rargseqsitemitemsiterableseqrY   resultkverS   r'   s   ````            @r(   rX   ItertoolsVariable.call_function:   s    ::***3F333F,TF!D66(C"ExxFKKM 2hZ ?@A!C9-889 6!8$779AEF#11"5DF &--t>A>>D ''T
3>   11.0 
 JJ)000D	QQ//33Q**,,Aw2226HQ**,AE!..x;Y44T$Z@A <11.0  ZZ9,,,0000F,TF!D66(C"BxxFKKM 2eW <=>!@9-889 C   4yA~$q'"A"A""E"E1g11"5I,TF!D66(C!4486vh OD!D
 T*66  3  1 13 1 F%--cw?DAMM!// (1'A'A'L'LQ'O'O %.$>$>$E$Ea$H)* ) > >$(G;K;M!"	 +;*< @0 11.0  ZZ9+++4y1} 77)9);  11%%b)*:*:;T6  ZZ9??*22%5%7  JJ)000TaCINtAw7Q7Q7S7S4yA~G..0 &22G55b91D ''T
3   11.0 
 7(T6::_ GB  U,TF!D66(C X:-99: Ds+   .W(")W-B3W2 )X02
X-<&X((X-r-   )__name__
__module____qualname____firstlineno__r   r%   rP   r/   r3   r   rX   __static_attributes____classcell__r'   s   @r(   r   r   /   sq    c S T 2# 2C e;#e; ()e; -	e;
 
e; e;r*   r   c            
          ^  \ rS rSrS\SS4U 4S jjrSSS\4S jrSSS\\   4S	 jr	SSS
\
\/\4   SS4S jrSSS\4S jrSSS\SS4U 4S jjrSSS\S\\   S\\\4   S\4
U 4S jjrSrU =r$ )IteratorVariable   r   r    Nc                 &   > [         TU ]  " S0 UD6  g r"   )r$   r%   )r&   r   r'   s     r(   r%   IteratorVariable.__init__   s    "6"r*   r5   r   c                 D    [        SSU  S3S/ [        R                  QS9  g )NzUnimplemented next() callznext(r,   z(This abstract method must be implementedrC   )r   r	   
DYNAMO_BUGr&   r5   s     r(   next_variableIteratorVariable.next_variable   s*    /D6OB1%001		
r*   c                 @    / nU R                  XR                  5        U$ r2   )force_apply_to_var_sequencerl   )r&   r5   r~   s      r(   rd   *IteratorVariable.force_unpack_var_sequence   s      )+((]];r*   fnc                 n      U" U R                  U5      5        M  ! [         a    [        U5         g f = fr2   )r   r   r   )r&   r5   r   s      r(   r   ,IteratorVariable.force_apply_to_var_sequence   s@     4%%b)*  - )"-s    44c                     gNTr#   r   s     r(   has_force_unpack_var_sequence.IteratorVariable.has_force_unpack_var_sequence  s    r*   namer   c                 x   > US:X  d  US:X  a  [         R                  R                  S5      $ [        TU ]  X5      $ )N__iter____next__T)r   r   ro   r$   call_obj_hasattr)r&   r5   r   r'   s      r(   r   !IteratorVariable.call_obj_hasattr  s;     :!3--44T::w'11r*   r6   c                 b   > US:X  a  U $ US:X  a  U R                  U5      $ [        TU ]	  XX45      $ )Nr   r   )r   r$   call_method)r&   r5   r   r6   r   r'   s        r(   r   IteratorVariable.call_method  s=     :KZ%%b))w"2T::r*   r#   )r   r   r   r   r   r%   r   r   rf   rd   r   r   boolr   rP   r   dictr   r   r   r   s   @r(   r   r      s    # # #
 7 
O 
)	o	)/7s
/C	0G D 2)2142	2;#; ; ?#	;
 S/)*; 
; ;r*   r   c                   N   ^  \ rS rSrSrS\S\SS4U 4S jjrSS	S\4S
 jrSr	U =r
$ )ObjectIteratorVariablei  a6  
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                 @   > [         TU ]  " S0 UD6  Xl        SU l        g )NFr#   )r$   r%   r   generator_exhausted)r&   r   r   r'   s      r(   r%   ObjectIteratorVariable.__init__+  s     "6"#( r*   r5   r   c                     U R                   (       a  [        [        U5         U R                  R	                  U5      $ ! [
         a	    SU l         e f = fr   )r   r   StopIterationr   r   r   r   s     r(   r   $ObjectIteratorVariable.next_variable0  sK    ##$]B7	88))"--( 	 (,D$		s	   > A)r   r   )r   r   r   r   __doc__r   r   r%   r   r   r   r   s   @r(   r   r     s;    )O )s )t )

 7 
O 
 
r*   r   c                   T   ^  \ rS rSrS\S\SS4U 4S jjrSSS\4S	 jrSS
 jrSr	U =r
$ )rq   i=  rz   r   r    Nc                 2   > [         TU ]  " S0 UD6  Xl        g r"   )r$   r%   rz   )r&   rz   r   r'   s      r(   r%   RepeatIteratorVariable.__init__>  s    "6"	r*   r5   r   c                     U R                   $ r2   rz   r   s     r(   r   $RepeatIteratorVariable.next_variableC  s    yyr*   c                    ^ TR                  U4S j5        T" U R                  5        TR                  [        SS5      5        g )Nc                  n   > T R                  T R                  [        5      T R                  S5      /5      $ )Nr9   extend_outputcreate_load_python_moduler]   create_load_attrcodegens   r(   <lambda>4RepeatIteratorVariable.reconstruct.<locals>.<lambda>H  s1    G))55i@,,X6r*   r   F)add_push_nullrz   r   r   r&   r   s    `r(   reconstruct"RepeatIteratorVariable.reconstructF  s:    	
 			21e<=r*   r   r   r   r    N)r   r   r   r   r   r   r%   r   r   r   r   r   s   @r(   rq   rq   =  s;    _   
 7 O 
> 
>r*   rq   c            	       t   ^  \ rS rSr  SS\\\4   S\\\4   S\SS4U 4S jjjrSS	S\4S
 jr	SS jr
SrU =r$ )ru   iS  rz   stepr   r    Nc                    > [         TU ]  " S0 UD6  [        U[        5      (       d  [        R
                  " U5      n[        U[        5      (       d  [        R
                  " U5      nXl        X l        g r"   )r$   r%   rL   r   r   ro   rz   r   )r&   rz   r   r   r'   s       r(   r%   CountIteratorVariable.__init__T  sY     	"6"$00#**40D$00#**40D		r*   r5   r   c                     U R                  5       (       d   eU R                  nUR                  R                  R	                  U 5        U R                  R                  USU R                  /0 5      U l        U$ )N__add__)
is_mutablerz   outputside_effectsmutationr   r   )r&   r5   old_items      r(   r   #CountIteratorVariable.next_variableb  s]        99
		''-II))"i$))bI	r*   c                    ^ TR                  U4S j5        T" U R                  5        T" U R                  5        TR                  [	        SS5      5        g )Nc                  n   > T R                  T R                  [        5      T R                  S5      /5      $ )Nrt   r   r   s   r(   r   3CountIteratorVariable.reconstruct.<locals>.<lambda>k  s1    G))55i@,,W5r*   r   F)r   rz   r   r   r   r   s    `r(   r   !CountIteratorVariable.reconstructi  sF    	
 					21e<=r*   )rz   r   )r   r   r   )r   r   r   r   r   intr   r   r%   r   r   r   r   r   s   @r(   ru   ru   S  sm     -.,-C() C() 	
 
  7 O > >r*   ru   c            	          ^  \ rS rSrSrSS1\R                  kr SS\\   S\	S\
SS4U 4S	 jjjrS\\   4S
 jrSSS\	4S jrSSS\S   4S jrSSS\4S jrSS jrSS jrSrU =r$ )ZipVariableiw  z
Represents zip(*iterables)
indexstrict	iterablesr   r    Nc                 z   > [         TU ]  " S0 UD6  [        U[        5      (       d   eXl        SU l        X l        g Nr   r#   )r$   r%   rL   rf   r   r   r   )r&   r   r   r   r'   s       r(   r%   ZipVariable.__init__  s9     	"6")T****"
r*   c                     [         $ r2   )zipr.   s    r(   python_typeZipVariable.python_type      
r*   r5   r   c                 B   ^ [        U4S jU R                   5       5      $ )Nc              3   t   >#    U  H-  n[        U[        5      =(       d    UR                  T5      v   M/     g 7fr2   )rL   rf   rj   )r;   itr5   s     r(   r=   6ZipVariable.has_unpack_var_sequence.<locals>.<genexpr>  s2      
$ r4 BB$>$>r$BB$s   58)allr   r   s    `r(   rj   #ZipVariable.has_unpack_var_sequence  s!     
nn
 
 	
r*   r   c                    U R                  U5      (       d   e/ nU R                   HW  n[        U[        5      (       a  UR	                  X0R
                  S  5        M7  UR	                  UR                  U5      5        MY     U R                  (       a  SU R                  0O0 n[        U0 UD6nU Vs/ s H"  n[        R                  " [        U5      5      PM$     sn$ s  snf )Nr   )rj   r   rL   rf   rl   r   rk   r   r   r   re   )r&   r5   r   r   r   zippedvars          r(   rk   ZipVariable.unpack_var_sequence  s     ++B////	..B"d##  JJL!12  !7!7!;<	 !
 -1KK(DKK(Ri*6*>DEfs	''S	2fEEEs   2)Cc                   ^^ U R                  5       (       d   e[        U R                  5      S:X  a  [        [        T5        U R
                  m/ nS[        [        [           [        4   S[        4UU4S jjnS n [        U R                  5       H  u  pEUR                  U" U5      5        M     TR                   R"                  R%                  U 5        U =R
                  S-  sl        [&        R(                  " U5      $ ! [         ao    U R                  (       a\  US:X  a:  U R                   H)  n U" U5        O! [         a    [        T5         M%  f = f  O   e [        T5        [        [        S5      S ee f = f)Nr   r   r    c                    > [        U [        5      (       a$  T[        U 5      :  a  [        [        T5        U T   $ U R                  T5      $ r2   )rL   rf   ri   r   r   r   )r   	old_indexr5   s    r(   get_item+ZipVariable.next_variable.<locals>.get_item  sC     "d##B',]B?)}$''++r*   z3zip() has one argument of len differing from othersr   )r   ri   r   r   r   r   r   rf   r   	enumeraterl   r   r   r   r   
ValueErrorr   r   r   r   re   )r&   r5   r6   r   idxr   r   s    `    @r(   r   ZipVariable.next_variable  sS       t~~!#$]B7JJ		,d?+_<=	,	, 	, 	$T^^4HRL) 50 			''-

a
&&t,,1 ) 	{{!8"nn%$RL8 %5b9$%  - )"-I  )	s0   =5D 0E;3D<;E;<EE;E&E;c                     U R                    Hd  n[        U[        5      (       aD  X R                  S  nUR	                  U5        UR                  [        [        U5      5      5        M\  U" U5        Mf     g r2   )r   rL   rf   r   foreachappend_outputr   ri   )r&   r   r   remaining_itemss       r(   reconstruct_itemsZipVariable.reconstruct_items  sW    ..B"d##"$ZZ\"20%%&8_9M&NO !r*   c           	      J  ^ TR                  U4S jSS9  U R                  T5        TR                  [        [	        U R
                  5      5      5        TR                  TR                  S5      TR                  U R                  5      [        SSS9/[        SS5      Q5        g )	Nc                  (   > T R                  SS5      $ )Nbuiltinsr   load_import_fromr   s   r(   r   )ZipVariable.reconstruct.<locals>.<lambda>      G,,Z?r*   Tcall_function_exr   	BUILD_MAPr   rx   F)r   r   r   r   ri   r   r   create_load_constr   r   r   r   s    `r(   r   ZipVariable.reconstruct  s    ?RV 	 	
 	w'0T^^1DEF))(3))$++6";A6 )u5		
r*   )r   r   r   )Fr   )r   r   r   r   r   r   _nonvar_fieldsrf   r   r   r   r%   rQ   r   r   rj   rk   r   r   r   r   r   r   s   @r(   r   r   w  s    
 	 
	(	(N (  	
 
 T#Y 
*A 
d 
F)F		 F/- 7 /-O /-b
 
r*   r   c                      ^  \ rS rSrSrS\S\\   S\SS4U 4S jjrS\	4S	 jr
S
SS\4S jrS
SS\4U 4S jjrSS jrSrU =r$ )MapVariablei  z 
Represents map(fn, *iterables)
r   r   r   r    Nc                 4   > [         TU ]  " U40 UD6  Xl        g r2   )r$   r%   r   )r&   r   r   r   r'   s       r(   r%   MapVariable.__init__  s     	-f-r*   c                     [         $ r2   )mapr.   s    r(   r   MapVariable.python_type  r   r*   r5   r   c                     g)NFr#   r   s     r(   rj   #MapVariable.has_unpack_var_sequence  s    r*   c                 n   > [         TU ]  U5      nU R                  R                  XR                  0 5      $ r2   )r$   r   r   rX   r{   )r&   r5   r6   r'   s      r(   r   MapVariable.next_variable  s-    w$R(ww$$RR88r*   c           	        ^ TR                  U4S jSS9  T" U R                  5        U R                  T5        TR                  [	        [        U R                  5      S-   5      5        U R                  (       al  [        R                  S:  d   S5       eTR                  TR                  S5      TR                  U R                  5      [        SSS	9/[        SS
5      Q5        g TR                  [        S
S
5      5        g )Nc                  (   > T R                  SS5      $ )Nr  r  r  r   s   r(   r   )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   ri   r   r   sysversion_infor   r
  r   r   r   s    `r(   r   MapVariable.reconstruct  s    ?RV 	 	
 	w'0T^^1Dq1HIJ;;##w. H. !!--h7--dkk:&{: -T59	 !!"9%"GHr*   )r   r   )r   r   r   r   r   r   rf   r   r%   rQ   r   r   rj   r   r   r   r   r   s   @r(   r  r    sx     ( 	
 
T *A d 9 7 9O 9I Ir*   r  c                      ^  \ rS rSrSrS1\R                  krS\S\\   S\	SS4U 4S	 jjr
S\4S
 jrSSS\4S jrSSS\S   4S jrSSS\4S jrSS jrSS jrSrU =r$ )FilterVariablei  z!
Represents filter(fn, iterable)
r   r   r|   r   r    Nc                 L   > [         TU ]  " S0 UD6  Xl        X l        SU l        g r   )r$   r%   r   r|   r   )r&   r   r|   r   r'   s       r(   r%   FilterVariable.__init__)  s&     	"6" 
r*   c                     [         $ r2   )filterr.   s    r(   r   FilterVariable.python_type4  s    r*   r5   r   c                 z    [        U R                  [        5      =(       d    U R                  R                  U5      $ r2   )rL   r|   rf   rj   r   s     r(   rj   &FilterVariable.has_unpack_var_sequence7  s.    $--. 
$--2W2W3
 	
r*   r   c                 F   U R                  U5      (       d   eS n[        U R                  [        5      (       a  U R                  U R                  S  nOU R                  R                  U5      nU R                  R                  X0 5      n[        R                  " U/5      /$ r2   )
rj   rL   r|   rf   r   rk   r   rX   r   re   )r&   r5   r   filtereds       r(   rk   "FilterVariable.unpack_var_sequence<  s     ++B////dmmT**tzz|,B2226B77((4''
344r*   c                 |  ^ ^ S[         4U U4S jjn U" 5       nT =R                  S-  sl        T R                  R                  5       (       a  UnOT R                  R	                  TU/0 5      n[
        R                  " [        R                  5      R	                  TU/0 5      nUR                  5       (       a  U$ M  )Nr    c                     > TR                   n [        TR                  [        5      (       a8  U [	        TR                  5      :  a  [        [        T5        TR                  U    $ TR                  R                  T5      $ r2   )r   rL   r|   rf   ri   r   r   r   )r   r&   r5   s    r(   _next+FilterVariable.next_variable.<locals>._nextI  s\    

I$--..DMM 22,]B?}}Y//}}22266r*   r   )
r   r   r   is_constant_nonerX   r   UserFunctionVariabler
   	predicater3   )r&   r5   r.  rz   respred_ress   ``    r(   r   FilterVariable.next_variableH  s    	7 	7 	7 7DJJ!OJww''))gg++B; 55##mBr*  **,, r*   c                    [        U R                  [        5      (       aN  U R                  U R                  S  nUR	                  U5        UR                  [        [        U5      5      5        g U" U R                  5        g r2   )rL   r|   rf   r   r   r   r   ri   )r&   r   r   s      r(   r    FilterVariable.reconstruct_items`  sX    dmmT**"mmDJJL9OOOO,!!"4S5I"JKDMM"r*   c                    ^ TR                  U4S j5        T" U R                  5        U R                  T5        TR                  [	        SS5      5        g )Nc                  (   > T R                  SS5      $ )Nr  r%  r  r   s   r(   r   ,FilterVariable.reconstruct.<locals>.<lambda>i  s    g&>&>z8&Tr*   r   F)r   r   r   r   r   r   s    `r(   r   FilterVariable.reconstructh  sB    TUw'21e<=r*   )r   r   r|   r   )r   r   r   r   r   r   r  r   rf   r   r%   rQ   r   r   rj   rk   r   r   r   r   r   r   s   @r(   r!  r!    s    
 			(	(N
		 '	 		
 
	T 
*A 
d 


5)
5		 
5 7 O 0#> >r*   r!  )+r   r]   r  collections.abcr   r   typingr   r   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   rq   ru   r   r  r!  r#   r*   r(   <module>rF     s     
 . , , 6 6   4 & /D   p; p;f8; 8;v- @>- >,!>, !>Hv
" v
r,I+ ,I^M>% M>r*   