'Construct a new OAuth 2 client session.
:param client_id: Client id obtained during registration
:param client: :class:`oauthlib.oauth2.Client` to be used. Default is
WebApplicationClient which is useful for any
hosted application but not mobile or desktop.
:param scope: List of scopes you wish to request access to
:param redirect_uri: Redirect URI you registered as callback
:param token: Token dictionary, must include access_token
and token_type.
:param state: State string used to prevent CSRF. This will be given
when creating the authorization url and must be supplied
when parsing the authorization response.
Can be either a string or a no argument callable.
:auto_refresh_url: Refresh token endpoint URL, must be HTTPS. Supply
this if you wish the client to automatically refresh
your access tokens.
:auto_refresh_kwargs: Extra arguments to pass to the refresh token
endpoint.
:token_updater: Method with one argument, token, to be used to update
your token databse on automatic token refresh. If not
set a TokenUpdated warning will be raised when a token
has been refreshed. This warning will carry the token
in its token argument.
:param kwargs: Arguments to pass to the Session constructor.'

def __init__(self, client_id=None, client=None, auto_refresh_url=None, auto_refresh_kwargs=None, scope=None, redirect_uri=None, token=None, state=None, token_updater=None, **kwargs):

    super(OAuth2Session, self).__init__(**kwargs)
    self._client = (client or WebApplicationClient(client_id, token=token))
    self.token = (token or {})
    self.scope = scope
    self.redirect_uri = redirect_uri
    self.state = (state or generate_token)
    self._state = state
    self.auto_refresh_url = auto_refresh_url
    self.auto_refresh_kwargs = (auto_refresh_kwargs or {})
    self.token_updater = token_updater
    self.compliance_hook = {u'access_token_response': set([]), u'refresh_token_response': set([]), u'protected_request': set([])}
