code: def renew_access_token(self):
          
          auth_params = {'REFRESH_TOKEN': self.refresh_token}
          self._add_secret_hash(auth_params, 'SECRET_HASH')
          refresh_response = self.client.initiate_auth(
              ClientId=self.client_id,
              AuthFlow='REFRESH_TOKEN',
              AuthParameters=auth_params,
          )
  
          self._set_attributes(
              refresh_response,
              {
                  'access_token': refresh_response['AuthenticationResult']['AccessToken'],
                  'id_token': refresh_response['AuthenticationResult']['IdToken'],
                  'token_type': refresh_response['AuthenticationResult']['TokenType']
              }
          )
docs: Sets a new access token on the User using the refresh token.