o
    i                     @   s6   d Z ddlZddlZddlZdededefddZdS )z"Utility for deprecating functions.    Nsince
removed_ininstructionsc                    s    fdd}|S )aF  Marks functions as deprecated.

    It will result in a warning when the function is called and a note in the
    docstring.

    Args:
        since: The version when the function was first deprecated.
        removed_in: The version when the function will be removed.
        instructions: The action users should take.
    c              	      s   t   fdd} jpd}td d d d}|dd	}t|d	kr>|\}}t|}|d||g}n	|d
 }|d|g}d||_|S )Nc                     sB   t jd j d j d d d dtdd  | i |S )N'.z' is deprecated in version z and will be removed in z	. Please    )category
stacklevel)warningswarn
__module____name__FutureWarning)argskwargs)functionr   r   r    f/var/www/html/eduruby.in/lip-sync/lip-sync-env/lib/python3.10/site-packages/torch/onnx/_deprecation.pywrapper   s   z.deprecated.<locals>.decorator.<locals>.wrapper z            .. deprecated:: z;
                Deprecated and will be removed in version z.
                Please z.
            z

   r   )	functoolswraps__doc__textwrapdedentsplitlenjoin)r   r   	docstringZdeprecation_noteZsummary_and_bodysummarybodyZnew_docstring_partsr   r   r   )r   r   	decorator   s*   
	

zdeprecated.<locals>.decoratorr   )r   r   r   r#   r   r"   r   
deprecated   s   ,r$   )r   r   r   r
   strr$   r   r   r   r   <module>   s
    