
    Wh                     .    d Z ddlZddlZddlZd Zd ZdS )zETensorBoard is a webapp for understanding TensorFlow runs and graphs.    Nc                       fd}|S )a!  Decorator to define a function that lazily loads the module 'name'.

    This can be used to defer importing troublesome dependencies - e.g. ones that
    are large and infrequently used, or that cause a dependency cycle -
    until they are actually used.

    Args:
      name: the fully-qualified name of the module; typically the last segment
        of 'name' matches the name of the decorated function

    Returns:
      Decorator function that produces a lazy-loading module 'name' backed by the
      underlying decorated function.
    c                      t            fd            d_        d_         G fddt          j                  } |          S )Nc                     j         rt          dz            d_         	              }d_         n# d_         w xY w| j                            |j                   d_        |S )Nz,Circular import when resolving LazyModule %rTF)loadingImportError__dict__updateloaded)selfmoduleload_fn	load_oncenames     V/var/www/html/movieo_spanner_bot/venv/lib/python3.11/site-packages/tensorboard/lazy.pyr   z-lazy_load.<locals>.wrapper.<locals>.load_once*   s      !BTI   !%I* $)	!!E	!))))M  111#IMs   
5 	>Fc                   .    e Zd Z fdZ fdZ fdZdS ).lazy_load.<locals>.wrapper.<locals>.LazyModulec                 6    t           |           |          S N)getattr)r   	attr_namer   s     r   __getattr__z:lazy_load.<locals>.wrapper.<locals>.LazyModule.__getattr__@   s    yy	:::    c                 4    t           |                     S r   )dirr   r   s    r   __dir__z6lazy_load.<locals>.wrapper.<locals>.LazyModule.__dir__C   s    99T??+++r   c                 B    j         rd |           z  S d| j        z  S )Nz<%r via LazyModule (loaded)>z+<module %r via LazyModule (not yet loaded)>)r
   __name__r   s    r   __repr__z7lazy_load.<locals>.wrapper.<locals>.LazyModule.__repr__F   s4    # L9IIdOOKKAm$r   N)r   
__module____qualname__r   r   r   )r   s   r   
LazyModuler   ?   s`        ; ; ; ; ;, , , , ,      r   r"   )_memoizer   r
   types
ModuleType)r   r"   r   r   s   ` @r   wrapperzlazy_load.<locals>.wrapper'   s     
	 	 	 	 	 	 
	 "	 	
	 	 	 	 	 	 	) 	 	 	 z$r    )r   r&   s   ` r   	lazy_loadr(      s$     '  '  '  '  ' R Nr   c                      t                      i t          j                    t          j                    fd            }|S )zKMemoizing decorator for f, which must have exactly 1 hashable
    argument.c                                          |           u r@5                       |           u r |           | <   d d d            n# 1 swxY w Y   |          S r   )get)argcacheflocknothings    r   r&   z_memoize.<locals>.wrapper\   s    99S'""g-- ( (99S'**g55!"3E#J( ( ( ( ( ( ( ( ( ( ( ( ( ( ( Szs   'AAA)object	threadingRLock	functoolswraps)r.   r&   r-   r/   r0   s   ` @@@r   r#   r#   S   si     hhGE ?D_Q        Nr   )__doc__r4   r2   r$   r(   r#   r'   r   r   <module>r7      sZ    L K         9 9 9x    r   