
    voiK                         S SK r S SKJr  S SK Jr  S SKrS SKrS rS r\S 5       rS r	 " S S	5      r
 " S
 S\5      rg)    N)entry_points)cachec                  R    [         R                  R                  SS5      n U S:X  a  gg)z7Determine if dispatching has been disabled by the user.SKIMAGE_NO_DISPATCHINGF1T)osenvironget)no_dispatchings    R/var/www/html/land-ocr/venv/lib/python3.13/site-packages/skimage/util/_backends.pydispatching_disabledr      s%    ZZ^^$<eDN    c                    U R                   nS/nU Vs/ s H  o1R                  U5      (       d  M  UPM     nn[        U5      S:X  aR  UR                  S5      n[        U5      S::  a  SU R                   < S3n[	        U5      eSR                  USS 5      nU$ [        U5      S:X  a  US   nU$ U < S	U< 3n[	        U5      es  snf )
zGet the name of the public module for a scikit-image function.

This computes the name of the public submodule in which the function can
be found.
zskimage.filters.rankr   .   zexpected func.__module__=z% with more than 2 dot-delimited partsN   z& matches more than one sub-submodule: )
__module__
startswithlensplit
ValueErrorjoin)func	full_namesub_submodulesname
candidatespartsmsgpublic_names           r   public_api_moduler!      s     I --N#1P>45I5I$5O$>JP
:!$u:?.doo//TUCS/!hhuRay)  
ZA	 m  >znMo Qs
   CCc                      0 n [        SS9n[        SS9nU HF  nSU0XR                  '    X#R                     nUR                  5       " 5       XR                     S'   MH     U $ ! [         a     MY  f = f)z7List all installed backends and information about them.skimage_backends)groupskimage_backend_infosimplementationinfo)r   r   loadKeyError)backends	backends_backend_infosbackendr'   s        r   all_backendsr.   6   s     H#56I '>?M"2G!<	 .D-1YY[]H\\"6*  O  		s   2A##
A10A1c                    ^ ^^ T R                   m[        T 5      m[        5       (       d  [        5       (       d  T $ [        R
                  " T 5      U UU4S j5       nU$ )zMark a function as dispatchable.

When a decorated function is called, the installed backends are
searched for an implementation. If no backend implements the function
then the scikit-image implementation is used.
c            
        > [        [        5       5       H  n[        5       U   nT ST	 3US   R                  ;  a  M*  US   R                  5       nUR                  " T ST	 3/U Q70 UD6nU(       d  Ma  UR                  T ST	 35      n[        R                  " ST ST	 SU S3[        SS9  U" U 0 UD6s  $    T" U 0 UD6$ )	N:r'   r&   z	Call to 'z' was dispatched to the 'z8' backend. Set SKIMAGE_NO_DISPATCHING=1 to disable this.r   )
stacklevel)	sortedr.   supported_functionsr(   can_hasget_implementationwarningswarnDispatchNotification)
argskwargsr   r-   backend_implwants_it	func_implr   func_module	func_names
          r   wrapperdispatchable.<locals>.wrapperY   s    <>*D"nT*G a	{+76?3V3VV"#3499;L $++-q,/37=H $77;-q8TUIMMK=) 5 !! %
 
 d-f--; +@ (((r   )__name__r!   r   r.   	functoolswraps)r   rA   r?   r@   s   ` @@r   dispatchablerF   I   sQ     I#D)K
 \^^__T%) %)N Nr   c                       \ rS rSrSrS rSrg)BackendInformation   zInformation about a backend

A backend that wants to provide additional information about itself
should return an instance of this from its information entry point.
c                     Xl         g )Nr4   )selfr4   s     r   __init__BackendInformation.__init__   s    #6 r   rK   N)rC   r   __qualname____firstlineno____doc__rM   __static_attributes__ r   r   rH   rH      s    7r   rH   c                       \ rS rSrSrSrg)r9      z?Notification issued when a function is dispatched to a backend.rS   N)rC   r   rO   rP   rQ   rR   rS   r   r   r9   r9      s    Ir   r9   )rD   importlib.metadatar   r   r   r7   r   r!   r.   rF   rH   RuntimeWarningr9   rS   r   r   <module>rX      sO     +  	 "J  $8v7 7	> 	r   