
    {Kg}                     0    d dl Z d dlmZ d Zedd       Zy)    N)contextmanagerc                     d| z  }|dkD  r	d|dz  z  }nd|z  }d|d|}dt        |      z
  t        |      z
  }||dz  |S )	zCreate one line message for logging purposes.

    Parameters
    ----------
    source : str
        String indicating the source or the reference of the message.

    message : str
        Short message.

    time : int
        Time in seconds.
    z[%s] <   z%4.1fminz %5.1fs z, total=F   .)len)sourcemessagetimestart_messagetime_strend_messagedots_lens          a/home/alanp/www/video.onchill/myenv/lib/python3.12/site-packages/sklearn/utils/_user_interface.py_message_with_timer      sd     f$M by+t#%,h7KC&&[)99H$hnkBB    c              #      K   |d yt        j                         }d t        t        | |t        j                         |z
               yw)aj  Log elapsed time to stdout when the context is exited.

    Parameters
    ----------
    source : str
        String indicating the source or the reference of the message.

    message : str, default=None
        Short message. If None, nothing will be printed.

    Returns
    -------
    context_manager
        Prints elapsed time upon exit if verbose.
    N)timeitdefault_timerprintr   )r
   r   starts      r   _print_elapsed_timer       sA     " $$& &2F2F2H52PQRs   AA)N)r   
contextlibr   r   r    r   r   <module>r      s'     %C6 S Sr   