
    uki3                     |    d Z ddlmZmZ ddlZddlZddlmZ dedee   de	eegef   eg e
e   f   e
e   f   fdZy)	zA LazyLoader class.    )CallableSequenceN)Anypackage_name
submodulesreturnc                      t        j                  d      j                  j                  d      t	        d      t              dt        dt        f fd}dt
        t           ffd}||fS )aF  Lazily loads submodules of a package.

  Returns:
    A tuple of ``__getattr__``, ``__dir__`` function and ``__all__`` --
    a list of available global names, which can be used to replace the
    corresponding definitions in the package.

  Raises:
    RuntimeError: If the ``__name__`` of the caller cannot be determined.
     __name__z0Cannot determine the ``__name__`` of the caller.namer   c                     | v r:t        j                   d|        }t        t        j                     | |       |S t        d d|  d      )N.zmodule 'z' has no attribute '')	importlibimport_modulesetattrsysmodulesAttributeError)r   value
owner_namer   r   s     O/home/cdr/jupyterlab/.venv/lib/python3.12/site-packages/jax/_src/lazy_loader.py__getattr__zattach.<locals>.__getattr__,   s]    z%%av&>?e ckk*%tU3l
8L>1EdV1M
NN    c                       S )N )__all__s   r   __dir__zattach.<locals>.__dir__5   s    Nr   )r   	_getframe	f_globalsgetRuntimeErrorliststrr   )r   r   r   r   r   r   s   ``  @@r   attachr%      su     }}Q))--j9*
I
JJ'O O O49  
gw	&&r   )__doc__collections.abcr   r   r   r   typingr   r$   tupler#   r%   r   r   r   <module>r*      sc     .  
 !' !'(3- !'EcUCZRc]I= !'r   