
    3j                    z    S r SSKJr  SSKrSSKJr  SSKJrJ	r	  \	" S5      r
SS jrSS jrSS	 jrSS
 jrSS jrg)zGLayer/Module Helpers
Hacked together by / Copyright 2020 Ross Wightman
    )annotationsN)repeat)IterableTypeVarTc                    [        U [        R                  R                  5      (       a  [        U [        5      (       d  U $ [        [        X5      5      $ )N)
isinstancecollectionsabcr   strtupler   )xns     V/home/wildlama/miniconda3/lib/python3.13/site-packages/spandrel/util/timm/__helpers.py_to_nr      s9    ![__--..z!S7I7I    c                    [        U S5      $ )N   r   r   s    r   	to_1tupler          A;r   c                    [        U S5      $ )N   r   r   s    r   	to_2tupler      r   r   c                    [        U S5      $ )N   r   r   s    r   	to_3tupler      r   r   c                    [        U S5      $ )N   r   r   s    r   	to_4tupler!       r   r   )r   T | Iterable[T]r   int)r   r"   returnztuple[T])r   r"   r$   ztuple[T, T])r   r"   r$   ztuple[T, T, T])r   r"   r$   ztuple[T, T, T, T])__doc__
__future__r   collections.abcr
   	itertoolsr   typingr   r   r   r   r   r   r   r!    r   r   <module>r+      s:    #   $CLr   