
    9jt                    x    d Z ddlmZ ddlmZ ddlmZ dgZ ed      Z ee	j                  d	      dd
       Zy)z
Python polyfills for copy
    )annotations)TypeVar   )substitute_in_graphreduce_ex_user_defined_objectTT)skip_signature_checkc               X    ddl }t        |       }|j                  |f| j                  ddfS )a  Traceable polyfill for object.__reduce_ex__ on user-defined objects.

    Returns the same tuple that CPython's _common_reduce produces:
    (copyreg.__newobj__, (cls,), obj.__dict__, None, None).
    copy._reconstruct then calls cls.__new__(cls) and updates __dict__.
    r   N)copyregtype
__newobj____dict__)objprotocolr   clss       \/media/conek/DATA/Code/OCR/venv/lib/python3.12/site-packages/torch/_dynamo/polyfills/copy.pyr   r      s5     
s)C	     N)r   r   r   intreturntuple)__doc__
__future__r   typingr   
decoratorsr   __all__r   object__reduce_ex__r    r   r   <module>r      sN    #  , $ CL V))E Fr   