<s> import logging <EOL> from functools import wraps <EOL> from time import time <EOL> def timeit ( log_level = logging . INFO , alternative_title = None ) : <EOL> def wrap ( f ) : <EOL> @ wraps ( f ) <EOL> def wrapped_f ( * args , ** kwargs ) : <EOL> t0 = time ( ) <EOL> result = f ( * args , ** kwargs ) <EOL> ts = round ( time ( ) - t0 , <NUM_LIT:3> ) <EOL> title = alternative_title or f . __name__ <EOL> logging . getLogger ( ) . log ( log_level , "<STR_LIT>" % ( title , ts ) ) <EOL> return result <EOL> return wrapped_f <EOL> return wrap </s>
