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

def cache_cleaned(name=None,
                  user=None,
                  force=False):
    '''
    Ensure that the given package is not cached.

    If no package is specified, this ensures the entire cache is cleared.

    name
        The name of the package to remove from the cache, or None for all packages

    user
        The user to run NPM with

    force
        Force cleaning of cache.  Required for npm@5 and greater

        .. versionadded:: 2016.11.6
    '''
    ret = {'name': name, 'result': None, 'comment': '', 'changes': {}}
    specific_pkg = None

    try:
        cached_pkgs = __salt__['npm.cache_list'](path=name, runas=user)
    except (CommandExecutionError, CommandNotFoundError) as err:
        ret['result'] = False
        ret['comment'] = 'Error looking up cached {0}: {1}'.format(
            name or 'packages', err)
        return ret

    if name:
        all_cached_pkgs = __salt__['npm.cache_list'](path=None, runas=user)
        # The first package is always the cache path
        cache_root_path = all_cached_pkgs[0]
        specific_pkg = '{0}/{1}/'.format(cache_root_path, name)

        if specific_pkg not in cached_pkgs:
            ret['result'] = True
            ret['comment'] = 'Package {0} is not in the cache'.format(name)
            return ret

    if __opts__['test']:
        ret['result'] = None
        ret['comment'] = 'Cached {0} set to be removed'.format(name or 'packages')
        return ret

    if __salt__['npm.cache_clean'](path=name, runas=user):
        ret['result'] = True
        ret['changes'][name or 'cache'] = 'Removed'
        ret['comment'] = 'Cached {0} successfully removed'.format(
            name or 'packages'
        )
    else:
        ret['result'] = False
        ret['comment'] = 'Error cleaning cached {0}'.format(name or 'packages')

    return ret