code: def token_getter(provider, token=None):
          
          session_key = provider + '_token'
          if token is None:
              token = session.get(session_key)
          return token
docs: Generic token getter for all the providers