human
I wrote the below code

    def decorator(self, *args, **kwargs):
        'Wrapper    function    to    refresh    session_id    on    PermissionError.'
        try:
            return func(self, *args, **kwargs)
        except PermissionError:
            _LOGGER.warning(('Invalid    session    detected.' + '    Tryign    to    refresh    session_id    and    re-run    the    rpc'))
            self.session_id = _get_session_id(self.url, self.username, self.password)
            return func(self, *args, **kwargs)
    return decorator

What's a good function header?

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

def _refresh_on_acccess_denied(func):