def METHOD_NAME(invalid_filter):
    """
    An invalid filter string should always be caught and a ValueError raised.
    """
    exc = (
        SyclDeviceCreationError
        if isinstance(invalid_filter, str)
        else ValueError
    )
    with pytest.raises(exc):
        dpctl.SyclDevice(invalid_filter)