code: def create_rds_response(
      default_services: List[str],
      internal_services_per_namespace: Dict[str, List[str]],
      proxy: str,
  ) -> dict:
      if proxy == "gateway":
          default_host = gateway_default_host
          internal_host = gateway_internal_host
      else:
          assert proxy == "internal-gateway"
          default_host = internal_gateway_default_host
          internal_host = internal_gateway_internal_host
  
      hosts = [default_host(service) for service in default_services]
      if len(internal_services_per_namespace) > 0:
          hosts.append(internal_host(internal_services_per_namespace))
      return {
          "version_info": "dummy",
          "type_url": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration",
          "resources": [
              {
                  "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration",
                  "name": "https_routes",
                  "request_headers_to_add": [
                      {
                          "header": {
                              "key": "X-Real-IP",
                              "value": "%DOWNSTREAM_REMOTE_ADDRESS%",
                          },
                          "append_action": "OVERWRITE_IF_EXISTS_OR_ADD",
                      }
                  ],
                  "virtual_hosts": hosts,
              }
          ],
          "control_plane": {
              "identifier": "ci",
          },
      }
  
file_path: hail/ci/ci/envoy.py
imports: import os
  import sys
  from typing import Dict, List
  import yaml
label_desc: Use image node_id 1 for calling a global function with example usage: create_rds_response(default_services, internal_services_per_namespace, proxy) and returns: dict