code: def requires_auth(func):
      
      @wraps(func)
      def wrapper(self, *args, **kwargs):
          if self.token is None or self.token_expired:
              self.login()
          elif self.token_needs_refresh:
              self.refresh_token()
          return func(self, *args, **kwargs)
      return wrapper
docs: Decorator for :class:`TVDBClient` methods that require authentication