def _colorize(stack_status, args):
    """
    Color the output, COMPLETE = green, FAILED = red, IN_PROGRESS = yellow.

    :param stack_status: stack status
    :param args: args
    :return: colorized status string
    """
    if not args.color:
        return stack_status
    end = '0m'
    status_to_color = {'COMPLETE': '0;32m', 'FAILED': '0;31m',
        'IN_PROGRESS': '10;33m'}
    for status_label in status_to_color:
        if status_label in stack_status:
            return '\x1b[%s%s\x1b[%s' % (status_to_color[status_label],
                stack_status, end)
