
    Ǆg                     t    d dl Z d dlZd dlZdedefdZe j                  d        Ze j                  d        Z	y)    Nnamereturnc                 h    	 t         j                  j                  |       }|duS # t        $ r Y y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     a/home/mcse/projects/flask_80/flask-venv/lib/python3.12/site-packages/torch/utils/_import_utils.py_check_module_existsr      s8    ~~''-4 s   "% 	11c                  F    t        d      xr t        j                          S )Ndill)r   torch_running_with_deploy     r   dill_availabler      s%     	V$ 	-**,,r   c                  H    t               sy dd l} | j                  d       | S )Nr   F)use_dill)r   r   extend)r   s    r   import_dillr      s#     	KKKKr   )
	functoolsimportlib.utilr   r   strboolr   	lru_cacher   r   r   r   r   <module>r      sU      s t     r   