code: def resolve_kde_settings (data):
      
      if "mode" not in data:
          return
      if data["mode"] == "indirect":
          for key in ("http_proxy", "https_proxy", "ftp_proxy"):
              if key in data:
                  resolve_indirect(data, key)
          if "ignore_hosts" in data:
              resolve_indirect(data, "ignore_hosts", splithosts=True)
      elif data["mode"] != "manual":
          # unsupported config
          for key in ("http_proxy", "https_proxy", "ftp_proxy"):
              if key in data:
                  del data[key]
docs: Write final proxy configuration values in data dictionary.