code: def get_descriptor_defaults(self, api_info, hostname=None):
      
      hostname = (hostname or endpoints_util.get_app_hostname() or
                  api_info.hostname)
      protocol = 'http' if ((hostname and hostname.startswith('localhost')) or
                            endpoints_util.is_running_on_devserver()) else 'https'
      base_path = api_info.base_path.strip('/')
      defaults = {
          'extends': 'thirdParty.api',
          'root': '{0}://{1}/{2}'.format(protocol, hostname, base_path),
          'name': api_info.name,
          'version': api_info.api_version,
          'api_version': api_info.api_version,
          'path_version': api_info.path_version,
          'defaultVersion': True,
          'abstract': False,
          'adapter': {
              'bns': '{0}://{1}/{2}'.format(protocol, hostname, base_path),
              'type': 'lily',
              'deadline': 10.0
          }
      }
      if api_info.canonical_name:
        defaults['canonicalName'] = api_info.canonical_name
      if api_info.owner_domain:
        defaults['ownerDomain'] = api_info.owner_domain
      if api_info.owner_name:
        defaults['ownerName'] = api_info.owner_name
      if api_info.package_path:
        defaults['packagePath'] = api_info.package_path
      if api_info.title:
        defaults['title'] = api_info.title
      if api_info.documentation:
        defaults['documentation'] = api_info.documentation
      return defaults
docs: Gets a default configuration for a service.
  
      Args:
        api_info: _ApiInfo object for this service.
        hostname: string, Hostname of the API, to override the value set on the
          current service. Defaults to None.
  
      Returns:
        A dictionary with the default configuration.