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

def get_console_output(
        name=None,
        location=None,
        instance_id=None,
        call=None,
        kwargs=None,
    ):
    '''
    Show the console output from the instance.

    By default, returns decoded data, not the Base64-encoded data that is
    actually returned from the EC2 API.
    '''
    if call != 'action':
        raise SaltCloudSystemExit(
            'The get_console_output action must be called with '
            '-a or --action.'
        )

    if location is None:
        location = get_location()

    if not instance_id:
        instance_id = _get_node(name)['instanceId']

    if kwargs is None:
        kwargs = {}

    if instance_id is None:
        if 'instance_id' in kwargs:
            instance_id = kwargs['instance_id']
            del kwargs['instance_id']

    params = {'Action': 'GetConsoleOutput',
              'InstanceId': instance_id}

    ret = {}
    data = aws.query(params,
                     return_root=True,
                     location=location,
                     provider=get_provider(),
                     opts=__opts__,
                     sigver='4')

    for item in data:
        if next(six.iterkeys(item)) == 'output':
            ret['output_decoded'] = binascii.a2b_base64(next(six.itervalues(item)))
        else:
            ret[next(six.iterkeys(item))] = next(six.itervalues(item))

    return ret