code: def _do_refresh_session(self):
          
          if self._session and self._last_session_refresh + self._loop_wait > time.time():
              return False
  
          if self._session:
              try:
                  self._client.session.renew(self._session)
              except NotFound:
                  self._session = None
          ret = not self._session
          if ret:
              try:
                  self._session = self._client.session.create(name=self._scope + '-' + self._name,
                                                              checks=self.__session_checks,
                                                              lock_delay=0.001, behavior='delete')
              except InvalidSessionTTL:
                  logger.exception('session.create')
                  self.adjust_ttl()
                  raise
  
          self._last_session_refresh = time.time()
          return ret
docs: :returns: `!True` if it had to create new session