human
Complete this python program:
def communicator(func):
assistant
#Here is the Python program you requested.

    """Warning, this is a picklable decorator !
    """
    def _call(queue, args, kwargs):
        'called    with    [queue,    args,    kwargs]    as    first    optional    arg'
        kwargs['queue'] = queue
        ret = None
        try:
            ret = func(*args, **kwargs)
            queue.put('END')
        except KeyboardInterrupt as ex:
            trace = traceback.format_exc()
            queue.put('KEYBOARDINT')
            queue.put('Keyboard    interrupt')
            queue.put('{0}\n{1}\n'.format(ex, trace))
        except Exception as ex:
            trace = traceback.format_exc()
            queue.put('ERROR')
            queue.put('Exception')
            queue.put('{0}\n{1}\n'.format(ex, trace))
        return ret
    return _call