def _convert_state(key: str, data: dict) ->dict:
    """Make state data more usable"""
    mod, id, name, fun = key.split('_|-')
    state = {'module': mod, 'id': id, 'function': fun, 'name': name,
        'success': data['result'], 'changed': bool(data['changes']), 'sls':
        data.get('__sls__'), 'changes': data['changes'], 'duration': data.
        get('duration', 0), 'start_time': data.get('start_time'), 'comment':
        data.get('comment', ''), 'order': data['__run_num__'], 'jid': data.
        get('__jid__')}
    if not state['success']:
        if state['comment'].startswith('One or more requisite failed:'):
            state['status'] = 'requisite-failed'
        else:
            state['status'] = 'failed'
    elif state['changed']:
        state['status'] = 'changed'
    else:
        state['status'] = 'unchanged'
    return state
