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

    """Decorator to execute function under lock
    """
    def wrapped(*args, **kwargs):
        cache_lock.acquire()
        try:
            return origfunc(*args, **kwargs)
        finally:
            cache_lock.release()
    return wrapped