human
I wrote the below code

    @wraps(func)
    def inner(self, *args, **kwargs):
        try:
            return func(self, *args, **kwargs)
        except Exception as e:
            if (not can_reconnect(e)):
                raise
            self.close(reconnect=True)
            return func(self, *args, **kwargs)
    return inner

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

def auto_reconnect_connection(func):