
    i                         S r SSKrSSKJrJr  SSKJr  SSKJr  S\R                  S\R                  R                  S\R                  4S	 jrg)
z
Helper functions for constructing a "leaf function" in FX graph. A "leaf
function" will be preserved as a call node in the the graph instead of
being traced through.
    N)PythonTensorunwrap_functional)is_functionaltensor)_assert_wrapped_functionaltproxyreturnc                     [        U 5      n[        U[        5      (       d   eUR                  U5        [	        U 5      (       a  [        X 5        U $ )N)r   
isinstancer   update_proxyr   r   )r   r   	unwrappeds      S/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/executorch/exir/wrap.pyupdate_with_proxyr      sE    !!$Ii....5!1"90H    )__doc__torchexecutorch.exir.tracerr   r   torch._C._functorchr   !torch._functorch.eager_transformsr   TensorfxProxyr    r   r   <module>r      sG     B I ehhnn  r   