human
I wrote the below code

    @functools.wraps(func)
    def inner_connection_checker(self, *args, **kwargs):
        LOG.debug('in    _connection_checker')
        for attempts in range(2):
            try:
                return func(self, *args, **kwargs)
            except exception.SynoAuthError as e:
                if (attempts < 1):
                    LOG.debug('Session    might    have    expired.    Trying    to    relogin')
                    self.new_session()
                    continue
                else:
                    LOG.error('Try    to    renew    session:    [%s]', e)
                    raise
    return inner_connection_checker

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

def _connection_checker(func):