def _ExtractProxy(proxy_yaml_key, proxy_config_data):
 proxy = None
 try:
  if (proxy_yaml_key in proxy_config_data):
   proxy_data = proxy_config_data.get(proxy_yaml_key)
   original_proxy_keys = list(proxy_data.keys())
   proxy = ProxyConfig.Proxy(proxy_data['host'], proxy_data['port'], username=proxy_data.get('username'), password=proxy_data.get('password'))
 except KeyError:
  raise googleads.errors.GoogleAdsValueError(('Your yaml file is missing some of the required proxy values. Required values are: %s, actual values are %s' % (_PROXY_KEYS, original_proxy_keys)))
 return proxy

def _ExtractProxy ( proxy_yaml_key , proxy_config_data ) : proxy = None try : if ( proxy_yaml_key in proxy_config_data ) : proxy_data = proxy_config_data . get ( proxy_yaml_key ) original_proxy_keys = list ( proxy_data . keys ( ) ) proxy = ProxyConfig . Proxy ( proxy_data [ 'host' ] , proxy_data [ 'port' ] , username = proxy_data . get ( 'username' ) , password = proxy_data . get ( 'password' ) ) except KeyError : raise googleads . errors . GoogleAdsValueError ( ( 'Your yaml file is missing some of the required proxy values. Required values are: %s, actual values are %s' % ( _PROXY_KEYS , original_proxy_keys ) ) ) return proxy
extracts a proxyconfig .