
    AVh	                     ~    d Z ddlmZ ddlmZ ddlmZ d Zej                  j                  ej                  e       y)z/Autograph-specific overrides for ragged_tensor.    )control_flow)cond)ragged_tensorc                 f            }t        j                  ||        j                  r j                  d    j                  d   n j                         d   dfd}fd}	 fd}
fd}t        j                  |       t        j
                  ||
||	d|z   |       y)z:Overload of for_stmt that iterates over TF ragged tensors.r   Nc                      f         z   S N )	get_stateiterate_indexs   ]/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/ops/ragged/ragged_autograph.pyaug_get_statez*_tf_ragged_for_stmt.<locals>.aug_get_state$   s    ik))    c                     | ^} |       y r   r	   )aug_loop_vars	loop_varsr   	set_states     r   aug_set_statez*_tf_ragged_for_stmt.<locals>.aug_set_state'   s     !.MI ir   c                  &                dz  y )N   r	   )bodyiter_r   s   r   aug_bodyz%_tf_ragged_for_stmt.<locals>.aug_body0   s    }	QMr   c                  F    k  } t        j                  | d       S | S )Nc                       y)NFr	   r	   r   r   <lambda>z7_tf_ragged_for_stmt.<locals>.aug_test.<locals>.<lambda>8   s    r   )tf_condr   )	main_test
extra_testr   ns    r   aug_testz%_tf_ragged_for_stmt.<locals>.aug_test5   s,    !I\\)Z??r   )z<internal iterate>)r   verify_loop_init_varsshaperow_lengths_add_max_iterations_hint_tf_while_stmt)r   r   r   r
   r   symbol_namesopts	init_varsr   r   r   r    r   r   s   `````       @@r   _tf_ragged_for_stmtr)      s     k)$$Y= [[U[[^/AAAA-*
 ''a0,
r   N)__doc__%tensorflow.python.autograph.operatorsr   tensorflow.python.opsr   r   tensorflow.python.ops.raggedr   r)   for_loop_registryregisterRaggedTensorr	   r   r   <module>r1      s;    6 > 1 6/d    ' ' 3r   