`L i0ddlZddlmZdZeddZy)N)contextmanagercd|z}|dkDr d|dz z}nd|z}d|d|}dt|z t|z }||dz|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)sourcemessagetime start_messagetime_str end_messagedots_lens c/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sklearn/utils/_user_interface.py_message_with_timersdf$M by+t#%,h7KC &&[)99H$hnk BBc#K|dytj}dtt||tj|z yw)ajLog 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_timerprintr)r r starts r_print_elapsed_timer#sA" $$&   &2F2F2H52PQRsA A)N)r contextlibrrrrrrs)%C6SSr