code: def save(self, filename):
          
          proxies = {'http': [], 'https': []}
          for protocol in ['http', 'https']:
              for proxy in self.proxies[protocol]:
                  serializable_proxy = self.proxies[protocol][proxy].to_dict()
                  proxies[protocol].append(serializable_proxy)
          with open(filename, 'w') as fout:
              json.dump(proxies, fout)
docs: Save proxies to file