U
    qh{                     @  s<   d dl mZ d dlmZ d dlmZmZ dddddZd	S )
    )annotations)Any)OpRun_split_class_namezdict[str, Any]z"dict[str, dict[int | None, OpRun]])module_contextreturnc           
      C  s   i }|   D ]\}}|ds|dkr(qt|ttr8qzt|t}W n: tk
r } ztd|d|d|W 5 d }~X Y nX |rt|\}}||kri ||< ||| |< q|st	d|
 D ]"}d |krqt|}	||	 |d < q|S )N_>   Uniontextwrap	TOptionalr   r   cl
get_schemaDict
class_nameListr   zUnexpected variable type z and class_name=.zNo registered operator. This error happens when no implementation of type 'OpRun' was detected. It may be due to an error during installation. Please try reinstalling onnx.)items
startswith
isinstancetype%build_registered_operators_any_domain
issubclassr   	TypeErrorr   RuntimeErrorvaluesmax)
r   Zreg_opsr   Z
class_typeZissubeZop_typeZ
op_versionimplZmax_version r   ?/tmp/pip-unpacked-wheel-xnis5xre/onnx/reference/ops/_helpers.pyr      s:    r   N)
__future__r   typingr   Zonnx.reference.op_runr   r   r   r   r   r   r   <module>   s   