human
Complete the below
def locked_function(origfunc):

    ''''Decorator to execute function under lock'
    '''
 ... Write me a the Python program you requested?
assistant
#Here is the Python program you requested.
    def wrapped(*args, **kwargs):
        cache_lock.acquire()
        try:
            return origfunc(*args, **kwargs)
        finally:
            cache_lock.release()
    return wrapped