Is there ever time headers wouldn't be a dict? If not, this seems defensive. In which case:

```
headers.update(kwargs.get('headers', {}))
```

or

```
try:
    headers.update(kwargs['headers'])
except KeyError:
   pass
```