o
    _{j�  ã                   @   s    d dl mZ dd„ Zdd„ ZdS )é    )Ú
MethodTypec                    ó   ‡ fdd„}|S )zwWhen a function is imported incorrectly due to a missing module, raise
    an import error when the function is called.c                    s   ‡ ‡fdd„}|S )Nc                     ó   t dˆ› dˆ j› d�ƒ‚©NzPlease install z to use Ú.©ÚImportErrorÚ__name__©ÚargsÚkwargs)ÚfuncÚmodule_name© ú//root/disk_3tb/HAC/mmaction/utils/decorators.pyÚnew_func
   ó   ÿz<import_module_error_func.<locals>.decorate.<locals>.new_funcr   )r   r   ©r   )r   r   Údecorate   s   z*import_module_error_func.<locals>.decorater   ©r   r   r   r   r   Úimport_module_error_func   ó   	r   c                    r   )zwWhen a class is imported incorrectly due to a missing module, raise an
    import error when the class is instantiated.c                    s   ‡ ‡fdd„}t |ˆ ƒˆ _ˆ S )Nc                     r   r   r   r
   )Úclsr   r   r   Úimport_error_init   r   zFimport_module_error_class.<locals>.decorate.<locals>.import_error_init)r   Ú__init__)r   r   r   )r   r   r      s   z+import_module_error_class.<locals>.decorater   r   r   r   r   Úimport_module_error_class   r   r   N)Útypesr   r   r   r   r   r   r   Ú<module>   s    