code: def set_proxy(self, proxy_server, proxy_port, proxy_username,
                    proxy_password):
          
          if proxy_server and proxy_port:
              if proxy_username and proxy_password:
                  self.proxy = {
                      "http": "http://{}:{}@{}:{}".format(proxy_username,
                                                          proxy_password,
                                                          proxy_server,
                                                          proxy_port),
                      "https": "https://{}:{}@{}:{}".format(proxy_username,
                                                            proxy_password,
                                                            proxy_server,
                                                            proxy_port),
                  }
              else:
                  self.proxy = {
                      "http": "http://{}:{}".format(proxy_server, proxy_port),
                      "https": "https://{}:{}".format(proxy_server, proxy_port),
                  }
docs: Sets a proxy on the Session
  
          :param str proxy_server: the proxy server
          :param int proxy_port: the proxy port, defaults to 8080
          :param str proxy_username: the proxy username
          :param str proxy_password: the proxy password