<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tonicdns_client(uri, method, token='', data='', keyword='', content='', raw_flag=False):
 """TonicDNS API client Arguments: uri: TonicDNS API URI method: TonicDNS API request method token: TonicDNS API authentication token data: Post data to TonicDNS API keyword: Processing keyword of response content: data exist flag raw_flag: True is return response data, False is pretty printing """

    res = request(uri, method, data, token)
    if token:
        if keyword == 'serial':
            args = {"token": token, "keyword": keyword, "content": content}
            cur_soa, new_soa = response(uri, method, res, **args)
            return cur_soa, new_soa

        else:
            if content is None:
                args = {"token": token, "keyword": keyword,
                        "content": content.get('domain')}
                response(uri, method, res, **args)
            else:
                # get sub command
                args = {"token": token, "keyword": keyword,
                        "raw_flag": raw_flag}
                data = response(uri, method, res, **args)
                return data

    else:
        args = {"token": token, "keyword": keyword}
        token = response(uri, method, res, **args)
        return token