o
    j9:jt                     @  sR   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ddZdS )z
Python polyfills for copy
    )annotations)TypeVar   )substitute_in_graphreduce_ex_user_defined_objectTT)skip_signature_checkobjprotocolintreturntuplec                C  s$   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__)r	   r
   r   cls r   c/home/nk/hobo-godmode/plappi-mvp/.venv/lib/python3.10/site-packages/torch/_dynamo/polyfills/copy.pyr      s   N)r	   r   r
   r   r   r   )__doc__
__future__r   typingr   
decoratorsr   __all__r   object__reduce_ex__r   r   r   r   r   <module>   s    