U
    —9%eF  ã                   @   s   d dl mZ ddd„ZdS )é    )ÚPythonCodePrinterÚpython3c                 C   s^   t d|iƒ}| | ¡}|jd r8d dd„ |jD ƒ¡}nd dd„ |j ¡ D ƒ¡}|d | S )	zÇRenders Python code as a module (with the required imports).

    Parameters
    ==========

    standard :
        See the parameter ``standard`` in
        :meth:`sympy.printing.pycode.pycode`
    ÚstandardZfully_qualified_modulesÚ
c                 s   s   | ]}d | V  qdS )z	import %sN© )Ú.0Úkr   r   úT/var/www/html/Darija-Ai-API/env/lib/python3.8/site-packages/sympy/codegen/pyutils.pyÚ	<genexpr>   s     z#render_as_module.<locals>.<genexpr>c                 S   s"   g | ]\}}d |d  |¡f ‘qS )zfrom %s import %sz, )Újoin)r   r   Úvr   r   r	   Ú
<listcomp>   s   ÿz$render_as_module.<locals>.<listcomp>z

)r   ZdoprintZ	_settingsr   Zmodule_importsÚitems)Úcontentr   ÚprinterZpystrZmodule_imports_strr   r   r	   Úrender_as_module   s    


ÿr   N)r   )Zsympy.printing.pycoder   r   r   r   r   r	   Ú<module>   s   