<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def user_auth_link(self, redirect_uri, scope='', state='', avoid_linking=False):
 """Generates a URL to send the user for OAuth 2.0 :param string redirect_uri: URL to redirect the user to after auth. :param string scope: The scope of the privileges you want the eventual access_token to grant. :param string state: A value that will be returned to you unaltered along with the user's authorization request decision. (The OAuth 2.0 RFC recommends using this to prevent cross-site request forgery.) :param bool avoid_linking: Avoid linking calendar accounts together under one set of credentials. (Optional, default: false). :return: authorization link :rtype: ``string`` """

        if not scope:
            scope = ' '.join(settings.DEFAULT_OAUTH_SCOPE)

        self.auth.update(redirect_uri=redirect_uri)

        url = '%s/oauth/authorize' % self.app_base_url
        params = {
            'response_type': 'code',
            'client_id': self.auth.client_id,
            'redirect_uri': redirect_uri,
            'scope': scope,
            'state': state,
            'avoid_linking': avoid_linking,
        }
        urlencoded_params = urlencode(params)
        return "{url}?{params}".format(url=url, params=urlencoded_params)