<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def clear_jobs():
    '''Clear old jobs

    :param days: Jobs for how many days should be kept (default: 10)
    :type days: integer

    :statuscode 200: no error
    :statuscode 403: not authorized to delete jobs
    :statuscode 409: an error occurred
    '''
    if not is_authorized():
        return json.dumps({'error': 'not authorized'}), 403, headers

    days = flask.request.args.get('days', None)
    return _clear_jobs(days)