
    QVji                         d dl Z d dlZd dlmZ d dlmZ dedefdZ	e j
        defd            Ze j
        dee         fd            ZdS )	    N)
ModuleType)Optionalnamereturnc                 l    	 t           j                            |           }|duS # t          $ r Y dS w xY w)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   specs     S/root/voice-cloning/.venv/lib/python3.11/site-packages/torch/utils/_import_utils.py_check_module_existsr      sI    ~''--4   uus   "% 
33c                       t          d          S )Ndill)r        r   dill_availabler      s    '''r   c                  Z    t                      sd S dd l} |                     d           | S )Nr   F)use_dill)r   r   extend)r   s    r   import_dillr      s9     tKKK 	KKKKr   )	functoolsimportlib.utilr   typesr   typingr   strboolr   	lru_cacher   r   r   r   r   <module>r      s                       s t     ( ( ( ( ( Xj)      r   