more pythonic:

```python
if 'input' not in kwargs or 'output' not in kwargs:
```
or

```python
if not('input' in kwargs and 'output' in kwargs):
```