human
I wrote the below code

    def inner(self, *args, **kwargs):
        self.host_lock.acquire()
        try:
            res = func(self, *args, **kwargs)
            self.host_lock.release()
        except Exception as e:
            self.host_lock.release()
            raise e
        return res
    return inner

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def lock_host(func, *args, **kwargs):