Ë
    ®Ó^j�  ã                  óT   — d dl mZ d dlZd dlmZ d dlmZ d dlmZ ddœ	 	 	 	 	 dd„Z	y)	é    )ÚannotationsN)ÚCallable)Ú
ModuleType)ÚDynamicLibNotFoundError)Úprobe_functionc               ó¶   — 	 t        j                  | «      }|�	  ||«       |S |S # t        $ r}|j                  | k7  r‚ Y d}~yd}~ww xY w# t        $ r Y yw xY w)a#  Import an optional CUDA module without masking unrelated import bugs.

    Returns:
        The imported module if available and the optional probe succeeds,
        otherwise ``None`` when the requested module is unavailable.

    Raises:
        ModuleNotFoundError: If the import fails because a dependency of the
            target module is missing (instead of the target module itself).
        Exception: Any exception raised by ``probe_function`` except
            :class:`DynamicLibNotFoundError`, which is treated as "unavailable".
    N)Ú	importlibÚimport_moduleÚModuleNotFoundErrorÚnamer   )Úfully_qualified_modnamer   ÚmoduleÚerrs       úp/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/cuda/pathfinder/_optional_cuda_import.pyÚ_optional_cuda_importr      sp   € ð"Ü×(Ñ(Ð)@ÓAˆð Ð!ð	Ù˜6Ô"ð €Mˆ6€Møô ò Ø�8‰8Ð.Ò.ØÜûðûô 'ò 	Ùð	ús%   ‚& šA ¦	A	¯AÁA	Á	AÁA)r   Ústrr   z%Callable[[ModuleType], object] | NoneÚreturnzModuleType | None)
Ú
__future__r   r	   Úcollections.abcr   Útypesr   Ú,cuda.pathfinder._dynamic_libs.load_dl_commonr   r   © ó    r   ú<module>r      s=   ðõ #ã Ý $Ý å Pð =AñØ ðð :ðð ô	r   