
    Vhv                         d dl mZ d dlmZmZ d dlZ G d d      Zdej                  j                  deej                  j                  ej                  j                  f   defd	Zy)
    )TracebackType)OptionalUnionNc                       e Zd Zdej                  j
                  deej                  j                  ej                  j                  f   fdZ	ddZ
deee      dee   d	ee   ddfd
Zy)_InsertPointinsert_point_graphinsert_pointc                 .    || _         || _        d | _        y N)r	   gguard)selfr   r	   s      C/home/dcms/DCMS/lib/python3.12/site-packages/torch/jit/_ir_utils.py__init__z_InsertPoint.__init__   s    
 )#
    returnNc                     | j                   j                         | _        | j                   j                  | j                         y r   )r   insertPointprev_insert_pointsetInsertPointr	   )r   s    r   	__enter__z_InsertPoint.__enter__   s/    !%!3!3!5d//0r   exc_typeexc_valexc_tbc                 N    | j                   j                  | j                         y r   )r   r   r   )r   r   r   r   s       r   __exit__z_InsertPoint.__exit__   s     	d445r   )r   N)__name__
__module____qualname__torch_CGraphr   NodeBlockr   r   r   typeBaseExceptionr   r    r   r   r   r      s    !HHNN EHHMM588>>9:164./6 -(6 '	6
 
6r   r   r   r	   r   c                     t        | |      S r   )r   )r   r	   s     r   insert_point_guardr)      s     l++r   )typesr   typingr   r   r    r   r!   r"   r#   r$   r)   r'   r   r   <module>r,      sW     " 6 6.,
((..,(-ehhmmUXX^^.K(L,,r   