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

def lucene_version(core_name=None):
    '''
    Gets the lucene version that solr is using. If you are running a multi-core
    setup you should specify a core name since all the cores run under the same
    servlet container, they will all have the same version.

    core_name : str (None)
        The name of the solr core if using cores. Leave this blank if you are
        not using cores or if you want to check all cores.

    Return: dict<str,obj>::

        {'success':boolean, 'data':dict, 'errors':list, 'warnings':list}

    CLI Example:

    .. code-block:: bash

        salt '*' solr.lucene_version
    '''
    ret = _get_return_dict()
    # do we want to check for all the cores?
    if _get_none_or_value(core_name) is None and _check_for_cores():
        success = True
        for name in __salt__['config.option']('solr.cores'):
            resp = _get_admin_info('system', core_name=name)
            if resp['success']:
                version_num = resp['data']['lucene']['lucene-spec-version']
                data = {name: {'lucene_version': version_num}}
            else:  # generally this means that an exception happened.
                data = {name: {'lucene_version': None}}
                success = False
            ret = _update_return_dict(ret, success, data, resp['errors'])
        return ret
    else:
        resp = _get_admin_info('system', core_name=core_name)
        if resp['success']:
            version_num = resp['data']['lucene']['lucene-spec-version']
            return _get_return_dict(True, {'version': version_num}, resp['errors'])
        else:
            return resp