def validate_attributes(config):
    """Validate attributes."""
    if config not in CONF_ATTRS:
        config[CONF_ATTRS] = {}
    elif not isinstance(config[CONF_ATTRS], dict):
        _LOGGER.warning(
            'Universal Media Player (%s) specified attributes '
            'not dict in config. They will be ignored.',
            config[CONF_NAME])
        config[CONF_ATTRS] = {}

    for key, val in config[CONF_ATTRS].items():
        attr = val.split('|', 1)
        if len(attr) == 1:
            attr.append(None)
        config[CONF_ATTRS][key] = attr
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/media_player/universal.py/validate_attributes/swapped operands of `not in`