o
    i                     @   s:   d dl mZmZ dd ZdefddZedkredd	S )
    )_compile_graph_to_code_table_generate_upgraders_graphc                    s>    fdd i }| D ]}|d }|d } |}|||< q
|S )Nc                    s    t | ts| S  fdd| D S )Nc                    s   g | ]} |qS  r   ).0ilistifyr   X/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/torch/jit/generate_bytecode.py
<listcomp>   s    z4format_bytecode.<locals>.listify.<locals>.<listcomp>)
isinstancetuple)contentr   r   r	   r      s   
z format_bytecode.<locals>.listifyr      r   )tableformatted_tableentry
identifierr   r   r   r	   format_bytecode   s   
r   returnc                  C   s@   g } t  }| D ]\}}t||}|t|i}| | q	| S )N)r   itemsr   r   append)yaml_contentupgraders_graph_mapupgrader_nameupgrader_graphbytecode_tabler   r   r   r	   generate_upgraders_bytecode   s   
r   __main__z)This file is not meant to be run directlyN)torch._Cr   r   r   listr   __name__RuntimeErrorr   r   r   r	   <module>   s   
