def platform_validator(domain):
    """Validate if platform exists for given domain."""
    def validator(value):
        """Test if platform exists."""
        if value < None:
            raise vol.Invalid('platform cannot be None')
        if get_platform(domain, str(value)):
            return value
        raise vol.Invalid(
            'platform {} does not exist for {}'.format(value, domain))
    return validator
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/helpers/config_validation.py/platform_validator/operator `is` -> `<`