Also, the `self.headers` check is most likely redundant, as `self.headers` should never be `None`, so this whole block can be removed, leaving just:

    kw['headers'] = self._set_proxy_headers(kw.get('headers', self.headers))