
    JTh                     f    S SK r S SKJr  S SKJrJr  S/rS\\/\4   S\\\S4      S\\	   4S	 jr
g)
    N)Iterable)AnyCallabletrace_dependenciescallableinputs.returnc                    ^ [        5       mU4S jn [        R                  " U5        U H  nU " U6   M
     [        R                  " S5        [        T5      $ ! [        R                  " S5        f = f)a  Trace the execution of a callable in order to determine which modules it uses.

Args:
    callable: The callable to execute and trace.
    inputs: The input to use during tracing. The modules used by 'callable' when invoked by each set of inputs
        are union-ed to determine all modules used by the callable for the purpooses of packaging.

Returns: A list of the names of all modules used during callable execution.
c                   > US:w  a  g U R                   R                  nS nX0R                  ;   a  U R                  U   R                  nOhX0R                  ;   a  U R                  U   R                  nO?SU R                  ;   a/  [        U R                  S   US 5      nU(       a  UR                  OS nU(       a  TR                  U5        g g )Ncallself)f_codeco_name	f_globals
__module__f_localsgetattradd)frameeventargnamemodulemethodmodules_useds         `/var/www/auris/envauris/lib/python3.13/site-packages/torch/package/analyze/trace_dependencies.pyrecord_used_modules/trace_dependencies.<locals>.record_used_modules   s     F? ||## ??"__T*55F^^#^^D)44Fu~~%U^^F3T4@F*0V&&dF V$     N)setsys
setprofilelist)r   r   r   inpr   s       @r   r   r   
   s_     5L%:
*+ CcN 
 	t 	ts   $A A0)r!   collections.abcr   typingr   r   __all__tupler#   strr    r   r   <module>r+      sQ    
 $    
 7ucz"7,4U38_,E7	#Y7r   