code: def GetService(self, service_name, version=None, server=None):
      
      if not server:
        server = _DEFAULT_ENDPOINT
      server = server.rstrip('/')
  
      if not version:
        version = sorted(_SERVICE_MAP.keys())[-1]
  
      try:
        version_service_mapping = _SERVICE_MAP[version][service_name]
      except KeyError:
        msg_fmt = 'Unrecognized %s for the AdWords API. Given: %s Supported: %s'
  
        if version in _SERVICE_MAP:
          raise googleads.errors.GoogleAdsValueError(
              msg_fmt % ('service', service_name, _SERVICE_MAP[version].keys()))
        else:
          raise googleads.errors.GoogleAdsValueError(
              msg_fmt % ('version', version, _SERVICE_MAP.keys()))
  
      service = googleads.common.GetServiceClassForLibrary(self.soap_impl)(
          self._SOAP_SERVICE_FORMAT % (
              server, version_service_mapping, version, service_name),
          _AdWordsHeaderHandler(
              self, version, self.enable_compression, self.custom_http_headers),
          _AdWordsPacker,
          self.proxy_config,
          self.timeout,
          version,
          cache=self.cache)
  
      return service
docs: Creates a service client for the given service.
  
      Args:
        service_name: A string identifying which AdWords service to create a
            service client for.
        [optional]
        version: A string identifying the AdWords version to connect to. This
            defaults to what is currently the latest version. This will be updated
            in future releases to point to what is then the latest version.
        server: A string identifying the webserver hosting the AdWords API.
  
      Returns:
        A googleads.common.GoogleSoapService instance which has the headers
        and proxy configured for use.
  
      Raises:
        A GoogleAdsValueError if the service or version provided do not exist.