U
    Mh                     @   sH   d dl Z d dlZd dlZeedddZe jdd Ze jdd Z	dS )	    N)namereturnc                 C   s2   zt j| }|dk	W S  tk
r,   Y dS X dS )aP  Returns if a top-level module with :attr:`name` exists *without**
    importing it. This is generally safer than try-catch block around a
    `import X`. It avoids third party libraries breaking assumptions of some of
    our tests, e.g., setting multiprocessing start method when imported
    (see librosa/#747, torchvision/#544).
    NF)	importlibutil	find_specImportError)r   spec r	   K/var/www/html/venv/lib/python3.8/site-packages/torch/utils/_import_utils.py_check_module_exists   s
    
r   c                   C   s   t dot  S )Ndill)r   torchZ_running_with_deployr	   r	   r	   r
   dill_available   s    r   c                  C   s"   t  s
d S dd l} | jdd | S )Nr   F)Zuse_dill)r   r   extend)r   r	   r	   r
   import_dill   s
    r   )
	functoolsimportlib.utilr   r   strboolr   	lru_cacher   r   r	   r	   r	   r
   <module>   s   
