code: def get_discovery_doc(self, services, hostname=None):
      
  
      if not isinstance(services, (tuple, list)):
        services = [services]
  
      # The type of a class that inherits from remote.Service is actually
      # remote._ServiceClass, thanks to metaclass strangeness.
      # pylint: disable=protected-access
      util.check_list_type(services, remote._ServiceClass, 'services',
                           allow_none=False)
  
      return self.__discovery_doc_descriptor(services, hostname=hostname)
docs: JSON dict description of a protorpc.remote.Service in discovery format.
  
      Args:
        services: Either a single protorpc.remote.Service or a list of them
          that implements an api/version.
        hostname: string, Hostname of the API, to override the value set on the
          current service. Defaults to None.
  
      Returns:
        dict, The discovery document as a JSON dict.