human
Write me a the Python program you requested given the following:
Complete the below
def log_events(klass):

    ''''Class decorator to log Qt events.'
    '''
assistant
#Here is the Python program you requested.
    old_event = klass.event
    @functools.wraps(old_event)
    def new_event(self, e, *args, **kwargs):
        'Wrapper    for    event()    which    logs    events.'
        log.misc.debug('Event    in    {}:    {}'.format(utils.qualname(klass), qenum_key(QEvent, e.type())))
        return old_event(self, e, *args, **kwargs)
    klass.event = new_event
    return klass