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

def delete_pool(hostname, username, password, name):
    '''
    Delete an existing pool.

    hostname
        The host/address of the bigip device
    username
        The iControl REST username
    password
        The iControl REST password
    name
        The name of the pool which will be deleted
    '''

    ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''}

    if __opts__['test']:
        return _test_output(ret, 'delete', params={
            'hostname': hostname,
            'username': username,
            'password': password,
            'name': name,
        }
        )

    #is this pool currently configured?
    existing = __salt__['bigip.list_pool'](hostname, username, password, name)
    # if it exists by name
    if existing['code'] == 200:

        deleted = __salt__['bigip.delete_pool'](hostname, username, password, name)
        # did we get rid of it?
        if deleted['code'] == 200:
            ret['result'] = True
            ret['comment'] = 'Pool was successfully deleted.'
            ret['changes']['old'] = existing['content']
            ret['changes']['new'] = {}

        # something bad happened
        else:
            ret = _load_result(deleted, ret)

    # not found
    elif existing['code'] == 404:
        ret['result'] = True
        ret['comment'] = 'This pool already does not exist. No changes made.'
        ret['changes']['old'] = {}
        ret['changes']['new'] = {}

    else:
        ret = _load_result(existing, ret)

    return ret