<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def authorization_url(self, **kwargs):
 """ Get authorization URL to redirect the resource owner to. https://tools.ietf.org/html/rfc6749#section-4.1.1 :param str redirect_uri: (optional) Absolute URL of the client where the user-agent will be redirected to. :param str scope: (optional) Space delimited list of strings. :param str state: (optional) An opaque value used by the client to maintain state between the request and callback :return: URL to redirect the resource owner to :rtype: str """

        payload = {'response_type': 'code', 'client_id': self._client_id}

        for key in kwargs.keys():
            # Add items in a sorted way for unittest purposes.
            payload[key] = kwargs[key]
        payload = sorted(payload.items(), key=lambda val: val[0])
        params = urlencode(payload)
        url = self.get_url('authorization_endpoint')

        return '{}?{}'.format(url, params)