code: def refresh_session(self):
          
  
          if not self._refresh_token:
              if self._username and self._password:
                  return self.login(self._username, self._password)
  
              return
  
          return self._authenticate(
              grant_type='refresh_token',
              refresh_token=self._refresh_token,
              client_id=self._client_id,
              client_secret=self._client_secret
          )
docs: Re-authenticate using the refresh token if available.
          Otherwise log in using the username and password
          if it was used to authenticate initially.
  
          :return: The authentication response or `None` if not available