code: def set_session(self, headers=None):
          
          if headers is None:
              headers = {
                  'User-Agent':
                  ('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3)'
                   ' AppleWebKit/537.36 (KHTML, like Gecko) '
                   'Chrome/48.0.2564.116 Safari/537.36')
              }
          elif not isinstance(headers, dict):
              raise TypeError('"headers" must be a dict object')
  
          self.session = Session(self.proxy_pool)
          self.session.headers.update(headers)
docs: Init session with default or custom headers
  
          Args:
              headers: A dict of headers (default None, thus using the default
                       header to init the session)