code: def _GenDiscoveryDoc(service_class_names,
                       output_path, hostname=None,
                       application_path=None):
    
    output_files = []
    service_configs = GenApiConfig(
        service_class_names, hostname=hostname,
        config_string_generator=discovery_generator.DiscoveryGenerator(),
        application_path=application_path)
    for api_name_version, config in service_configs.iteritems():
      discovery_name = api_name_version + '.discovery'
      output_files.append(_WriteFile(output_path, discovery_name, config))
  
    return output_files
docs: Write discovery documents generated from the service classes to file.
  
    Args:
      service_class_names: A list of fully qualified ProtoRPC service names.
      output_path: The directory to output the discovery docs to.
      hostname: A string hostname which will be used as the default version
        hostname. If no hostname is specificied in the @endpoints.api decorator,
        this value is the fallback. Defaults to None.
      application_path: A string containing the path to the AppEngine app.
  
    Returns:
      A list of discovery doc filenames.