def _check_condition(msg, key, value):
    """Check one condition.

    If the value is a list, check that the message element is within the list.
    Example::

        product: [green_snow, overview]

    """
    if isinstance(value, list):
        if msg.data[key] not in value:
            return False
    elif isinstance(value, str) and value[0] in ['<', '>', '=', '!']:
        return eval(str(float(msg.data[key])) + value)
    elif msg.data[key] != value:
        return False
    return True
