def merge_partial_elements(element_list):
    """
    merges model elements which collectively all define the model component,
    mostly for multidimensional subscripts

    Parameters
    ----------
    element_list

    Returns
    -------
    """
    outs = dict()
    for element in element_list:
        if element['py_expr'] != 'None':
            name = element['py_name']
            if name not in outs:
                eqn = element['expr'] if 'expr' in element else element['eqn']
                outs[name] = {'py_name': element['py_name'], 'real_name':
                    element['real_name'], 'doc': element['doc'], 'py_expr':
                    [element['py_expr']], 'unit': element['unit'], 'subs':
                    [element['subs']], 'lims': element['lims'], 'eqn': eqn,
                    'kind': element['kind'], 'arguments': element['arguments']}
            else:
                outs[name]['doc'] = outs[name]['doc'] or element['doc']
                outs[name]['unit'] = outs[name]['unit'] or element['unit']
                outs[name]['lims'] = outs[name]['lims'] or element['lims']
                outs[name]['eqn'] = outs[name]['eqn'] or element['eqn']
                outs[name]['py_expr'] += [element['py_expr']]
                outs[name]['subs'] += [element['subs']]
                outs[name]['arguments'] = element['arguments']
    return list(outs.values())
