
    ; j                    X    S SK Jr  S SKrS SKJr  S SKJr  S SKJr  SS.     SS jjr	g)	    )annotationsN)Callable)
ModuleType)DynamicLibNotFoundError)probe_functionc                    [         R                  " U 5      nUb   U" U5        U$ U$ ! [         a  nUR                  U :w  a  e  SnAgSnAff = f! [         a     gf = f)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       v/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/cuda/pathfinder/_optional_cuda_import.py_optional_cuda_importr      sp    "(()@A !	6" M6M  88.. ' 		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   