
    h                         S SK Jr  SrSrSr\4S jr\" \\S9r\" \\S9r\" \\S9r	SS jr
\S:X  a  \" S	S
5        \" S	S
5        \	" S	S
5        gg)    )Iterable91m92m93mc                    ^ ^ UU 4S jnU$ )z_A decorator to print text in the specified terminal color by wrapping the given print function.c                  D   > [        ST 3SS9  T" U 0 UD6  [        SSS9  g )Nz[ )endz[00m)print)argskwargscolorfn_prints     D/home/james-whalen/.local/lib/python3.13/site-packages/thop/utils.pyactual_call#colorful_print.<locals>.actual_call   s*    eWo2&$!&!jb!     )r   r   r   s   `` r   colorful_printr   
   s    "
 r   )r   c                    [        U [        5      (       d  U /n / nU  H  nUS:  a  UR                  XS-  -  S-   5        M$  US:  a  UR                  XS-  -  S-   5        ME  US:  a  UR                  XS-  -  S-   5        Mf  US:  a  UR                  XS-  -  S-   5        M  UR                  X-  S	-   5        M     [        U5      S
:X  a  US   $ / UQ7$ )z]Formats numbers into human-readable strings with units (K for thousand, M for million, etc.).g   mBTg    eAGg    .AMg     @@KB   r   )
isinstancer   appendlen)numsformatclever_numsnums       r   clever_formatr$      s    dH%%vK:vt4s:;3Yvs3c9:3Yvs3c9:3Yvs3c9:v|c12  !-2;q>G+Gr   __main__helloworldN)z%.2f)collections.abcr   	COLOR_REDCOLOR_GREENCOLOR_YELLOWr   r   prRedprGreenprYellowr$   __name__r   r   r   <module>r0      s|    %	 $-  	uI.
k
2%|4H* z	'7GWWg r   