code: def refresh_session(self, session=None):
          
          if 'refresh_token' in self.token:
              try:
                  token = self._context.acquire_token_with_refresh_token(
                      self.token['refresh_token'],
                      self.id,
                      self.resource,
                      self.secret # This is needed when using Confidential Client
                  )
                  self.token = self._convert_token(token)
              except adal.AdalError as err:
                  raise_with_traceback(AuthenticationError, "", err)
          return self.signed_session(session)
docs: Return updated session if token has expired, attempts to
          refresh using newly acquired token.
  
          If a session object is provided, configure it directly. Otherwise,
          create a new session and return it.
  
          :param session: The session to configure for authentication
          :type session: requests.Session
          :rtype: requests.Session.