code: def _requires_refresh_token(self):
          
          expires_on = datetime.datetime.strptime(
              self.login_data['token']['expiresOn'], '%Y-%m-%dT%H:%M:%SZ')
          refresh = datetime.datetime.utcnow() + datetime.timedelta(seconds=30)
          return expires_on < refresh
docs: Check if a refresh of the token is needed