'Return a stack output value for a given key.'

@staticmethod
def _stack_output(stack, output_key, validate_errors=True):

    value = None
    for o in stack.outputs:
        if (validate_errors and ('output_error' in o)):
            raise ValueError(('Unexpected    output    errors    in    %s    :    %s' % (output_key, o['output_error'])))
        if (o['output_key'] == output_key):
            value = o['output_value']
    return value
