
    0Ph                     8    d dl Z d dlmZ d Zedd            ZdS )    N)contextmanagerc                     d| z  }|dk    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          ]/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/sklearn/utils/_user_interface.py_message_with_timer      sz     f$M byy+t#%,WWhh7KC&&&[)9)99H$}hnnkkBB    c              #      K   |dV  dS t          j                    }dV  t          t          | |t          j                    |z
                       dS )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   #   s`      " $&& &2F2H2H52PQQRRRRRr   )N)r   
contextlibr   r   r    r   r   <module>r      sd     % % % % % %C C C6 S S S S S Sr   