o
    ۷iD                     @   s   d Z ddlZdd ZdS )z3
Doc utilities: Utilities related to documentation
    Nc                    s    fdd}|S )Nc                    s   | j }|d}d}|t|k r.td|| d u r.|d7 }|t|k r.td|| d u s|t|k r> ||< d|}n
td|  d| || _ | S )N
r   z^\s*Examples?:\s*$   zThe function zY should have an empty 'Examples:' in its docstring as placeholder, current docstring is:
)__doc__splitlenresearchjoin
ValueError)fnfunc_doclinesiexample_docstring O/home/ubuntu/vllm_env/lib/python3.10/site-packages/diffusers/utils/doc_utils.pydocstring_decorator   s    
  z6replace_example_docstring.<locals>.docstring_decoratorr   )r   r   r   r   r   replace_example_docstring   s   r   )r   r   r   r   r   r   r   <module>   s   