�
<��g�
� �N � d dl mZ d dlZd dlmZ d dlmZ dgZdd
�Z ddd�Z dS )� )�annotationsN)�Iterable)�Any�lazy_import�name�str�source� namespace�dict[str, Any]�returnr c �� � d}|| dk r.|dz
}|t |� � k s
J d� � �|| dk �.t ||d� |d| g|� � }t || � � S )aN
Import ``name`` from ``source`` in ``namespace``.
There are two use cases:
- ``name`` is an object defined in ``source``;
- ``name`` is a submodule of ``source``.
Neither :func:`__import__` nor :func:`~importlib.import_module` does
exactly this. :func:`__import__` is closer to the intended behavior.
r �.� z%importing from parent isn't supportedN)�len�
__import__�getattr)r r r
�level�modules �b/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/websockets/imports.py�import_namer s� � �
�E�
��-�3�
�
�
��
���s�6�{�{�"�"�"�$K�"�"�"� ��-�3�
�
� ��u�v�v�� �4�$���
G�
G�F��6�4� � � � �aliases�dict[str, str] | None�deprecated_aliases�Nonec � � ������� ��i ���i �t � � � �t �� � �t �� � ���z r
J d� � ���z r
J d� � ���z r
J d� � �� d �d
��� �fd�}|� d <