<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def exchange_token(self, client_id, client_secret, redirect_uri, code):
 """Exchange a provided OAuth code for an OAuth access token, 'expires in' value and refresh token."""

        params = [
            ('grant_type', 'authorization_code'),
            ('client_id', client_id),
            ('client_secret', client_secret),
            ('redirect_uri', redirect_uri),
            ('code', code),
        ]
        response = self._post('', urlencode(params),
                              CreateSend.oauth_token_uri, "application/x-www-form-urlencoded")
        access_token, expires_in, refresh_token = None, None, None
        r = json_to_py(response)
        if hasattr(r, 'error') and hasattr(r, 'error_description'):
            err = "Error exchanging code for access token: "
            err += "%s - %s" % (r.error, r.error_description)
            raise Exception(err)
        access_token, expires_in, refresh_token = r.access_token, r.expires_in, r.refresh_token
        return [access_token, expires_in, refresh_token]