
    sh                     D    S SK r S SKrS SKJr  SrS\\   S\S\S\4S jrg)	    N)CallablezMUsage of '{old_location}' is deprecated; please use '{new_location}' instead.all
old_module
new_modulereturnc                 X   ^ ^^ [         R                  UTS9mS[        SS4U UU4S jjnU$ )a  Import utility to lazily import deprecated packages / modules / functional.

The old_module and new_module are also used in the deprecation warning defined
by the `_MESSAGE_TEMPLATE`.

Args:
    all: The list of the functions that are imported. Generally, the module's
        __all__ list of the module.
    old_module: Old module location
    new_module: New module location / Migrated location

Returns:
    Callable to assign to the `__getattr__`

Usage:

    # In the `torch/nn/quantized/functional.py`
    from torch.nn.utils._deprecation_utils import lazy_deprecated_import
    _MIGRATED_TO = "torch.ao.nn.quantized.functional"
    __getattr__ = lazy_deprecated_import(
        all=__all__,
        old_module=__name__,
        new_module=_MIGRATED_TO)
)old_locationnew_locationnamer   Nc                    > U T;   a<  [         R                  " T[        5        [        R                  " T5      n[        X5      $ [        ST< SU < S35      e)NzModule z has no attribute .)warningswarnRuntimeWarning	importlibimport_modulegetattrAttributeError)r   packager   r   warning_messages     u/Users/tiagomarins/Projetos/claudeai/copy_bank/venv/lib/python3.13/site-packages/torch/nn/utils/_deprecation_utils.pygetattr_dunder.lazy_deprecated_import.<locals>.getattr_dunder,   sP    3; MM/>:--j9G7))wzn4FthaPQQ    )_MESSAGE_TEMPLATEformatstr)r   r   r   r   r   s   ` ` @r   lazy_deprecated_importr      sC    : (..j / ORS RT R R r   )r   r   typingr   r   listr   r    r   r   <module>r"      sF       U 
*	c** * 	*r   