Ë
    f^(hÖ  ã            
       ó†   — d dl mZmZmZ d dlmZmZ deeef   dedeeef   fd„Z	deded	eee
   eee
   egef   defd
„Zy)é    )ÚAnyÚCallableÚOptional)ÚContextÚTreeSpecÚuser_kwargsÚspecÚreturnc                 óV  — |j                   t        u sJ ‚|j                  dk(  sJ ‚|j                  d   }|j                   t        u sJ ‚t        | «      t        |j                  «      k7  r$t        dt        | «      › d|j                  › �«      ‚i }|j                  D ]
  }| |   ||<   Œ |S )aX  Reorder user-provided kwargs to match the order in `spec`. `spec` is
    expected to be the in_spec of an exported program, i.e. the spec that
    results from flattening `(args, kwargs)`.

    We need this to provide consistent input ordering, such so that users can
    pass in foo(a=a, b=b) OR foo(b=b, a=a) and receive the same result.
    é   é   z>Ran into a kwarg keyword mismatch: Got the following keywords z but expected )	ÚtypeÚtupleÚnum_childrenÚchildren_specsÚdictÚsetÚcontextÚ
ValueErrorÚlist)r   r	   Úkwargs_specÚreordered_kwargsÚkws        úV/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/torch/export/_tree_utils.pyÚreorder_kwargsr      sÊ   € ð �9‰9œÑÐÐØ×Ñ Ò!Ð!Ð!Ø×%Ñ% aÑ(€KØ×ÑœtÑ#Ð#Ð#ä
ˆ;Óœ3˜{×2Ñ2Ó3Ò3Üð*Ü*.¨{Ó*;Ð)<¸NÈ;×K^ÑK^ÐJ_ðaó
ð 	
ð
 ÐØ×!Ñ!ò /ˆØ*¨2™Ð˜Òð/ð Ðó    Úspec1Úspec2Úequivalence_fnc                 ó2  —  || j                   | j                  |j                   |j                  «      syt        | j                  «      t        |j                  «      k7  ryt	        | j                  |j                  «      D ]  \  }}t        |||«      rŒ y y)a,  Customizable equivalence check for two TreeSpecs.

    Arguments:
        spec1: The first TreeSpec to compare
        spec2: The second TreeSpec to compare
        equivalence_fn: A function to determine the equivalence of two
            TreeSpecs by examining their types and contexts. It will be called like:

                equivalence_fn(spec1.type, spec1.context, spec2.type, spec2.context)

            This function will be applied recursively to all children.

    Returns:
        True if the two TreeSpecs are equivalent, False otherwise.
    FT)r   r   Úlenr   ÚzipÚis_equivalent)r   r   r   Úchild_spec1Úchild_spec2s        r   r#   r#   !   sƒ   € ñ( ˜%Ÿ*™* e§m¡m°U·Z±ZÀÇÁÔOØô ˆ5×ÑÓ ¤C¨×(<Ñ(<Ó$=Ò=Øä$'¨×(<Ñ(<¸e×>RÑ>RÓ$Sò Ñ ˆ�[Ü˜[¨+°~ÕFÙðð r   N)Útypingr   r   r   Útorch.utils._pytreer   r   r   Ústrr   r   Úboolr#   © r   r   ú<module>r+      s}   ðß *Ñ *ç 1ð  S¨# X¡ð °hð À4ÈÈSÈÁ>ó ð6Øðàðð ˜h t™n¨g°xÀ±~ÀwÐOÐQUÐUÑVðð 
ô	r   