This is incorrect. You need to do

```python
if 'x' not in kwargs and 'y' not in kwargs:
    # more code
```

to achieve what you want.