o
    ?e
                     @   s6   d Z ddlZddlZddlmZ G dd dejZdS )zA LazyLoader class.    N)
tf_loggingc                       sB   e Zd ZdZd fdd	Zdd Zdd Zd	d
 Zdd Z  Z	S )
LazyLoaderzLazily import a module, mainly to avoid pulling in large dependencies.

  `contrib`, and `ffmpeg` are examples of modules that are large and not always
  needed, and this allows them to only be loaded when they are used.
  Nc                    s>   || _ || _|| _|ddd | _d | _tt| | d S )N.   r   )	_local_name_parent_module_globals_warningrsplit
__module____wrapped__superr   __init__)selfZ
local_nameZparent_module_globalsnamewarning	__class__ c/home/www/facesmatcher.com/pyenv/lib/python3.10/site-packages/tensorflow/python/util/lazy_loader.pyr      s   zLazyLoader.__init__c                 C   sB   t | j}|| j| j< | jrt| j d| _| j	|j |S )z8Load the module and insert it into the parent's globals.N)
	importlibimport_module__name__r   r   r   loggingr   __dict__updater   moduler   r   r   _load.   s   zLazyLoader._loadc                 C   s   |   }t||S N)r   getattr)r   itemr   r   r   r   __getattr__A   s   
zLazyLoader.__getattr__c                 C   s   d| j  d| j dS )Nz<LazyLoader z as >)r   r   )r   r   r   r   __repr__E   s   zLazyLoader.__repr__c                 C   s   |   }t|S r   )r   dirr   r   r   r   __dir__J   s   zLazyLoader.__dir__r   )
r   r
   __qualname____doc__r   r   r!   r#   r%   __classcell__r   r   r   r   r      s    r   )r'   r   typesZtensorflow.python.platformr   r   
ModuleTyper   r   r   r   r   <module>   s
   