
    M/Ph                     8   d dl mZmZmZmZmZmZmZmZ d dl	m
Z
mZ d dlmZ  ed          Zdeeee         f         de
fdZ	 	 dd	ed
eeegef         deeee         eeeee         f                  ef                  deeee         ef                  fdZdS )    )AnyCallableListOptionalSequenceTypeTypeVarUnion)IdentityRelationInferenceRelation)VisionsBaseTypeTitemsreturnc                     t          | t                    rt          di | S t          | t                    rt          |           S t          d          )N)related_typez<identity should be a list, a dict of params or related_type. )
isinstancedictr   
issubclassr   	TypeError)r   s    S/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/visions/declarative.pyprocess_relationr   	   s\    % X((%(((	E?	+	+ XU3333VWWW    Nnamecontainsidentity	inferencec                     fd}fd}t          | t          ft          |          t          |          d          S )Nc                  ,   t          t                    rd D             } ng nt                    g} Zt          t                    r| t	          di gz  } n4t          t
                    r| d D             z  } nt          d          | S )Nc                 ,    g | ]}t          |          S r   )r   ).0items     r   
<listcomp>z6create_type.<locals>.get_relations.<locals>.<listcomp>   s!    EEED)$//EEEr   c                 &    g | ]}t          d i |S )r   )r   )r"   paramss     r   r$   z6create_type.<locals>.get_relations.<locals>.<listcomp>$   s'    RRRf/99&99RRRr   z/inference should be a list or a dict of params.r   )r   r   r   r   r   listr   )	relationsr   r   s    r   get_relationsz"create_type.<locals>.get_relations   s    h)) 	QEEHEEEII&.5Eh5O5O4PI )T** S/<<)<<==		It,, SRR	RRRR		 QRRRr   c                      | |          S )Nr   )seriesstater   s     r   contains_opz create_type.<locals>.contains_op*   s    x&&&r   )r)   r-   )typer   staticmethod)r   r   r   r   r)   r-   s    ```  r   create_typer0      sy          ' ' ' ' ' 	)-88'44	
 	
  r   )NN)typingr   r   r   r   r   r   r	   r
   visions.relationsr   r   visions.types.typer   r   r   r   strboolr0   r   r   r   <module>r6      sM   P P P P P P P P P P P P P P P P P P P P A A A A A A A A . . . . . .GCLLXE$_(="=> XCS X X X X 	37" "
"T{D()" d?#T%d?6K0K*L%MtST" d4j$./0" " " " " "r   