<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def auth_uri(self, redirect_uri=None, scope=None, scope_delim=None, state=None, **kwargs):
 """ Builds the auth URI for the authorization endpoint :param scope: (optional) The `scope` parameter to pass for authorization. The format should match that expected by the provider (i.e. Facebook expects comma-delimited, while Google expects space-delimited) :param state: (optional) The `state` parameter to pass for authorization. If the provider follows the OAuth 2.0 spec, this will be returned to your `redirect_uri` after authorization. Generally used for CSRF protection. :param **kwargs: Any other querystring parameters to be passed to the provider. """

        kwargs.update({
            'client_id': self.client_id,
            'response_type': 'code',
        })

        if scope is not None:
            kwargs['scope'] = scope

        if state is not None:
            kwargs['state'] = state

        if redirect_uri is not None:
            kwargs['redirect_uri'] = redirect_uri

        return '%s?%s' % (self.auth_endpoint, urlencode(kwargs))