code: def __directory_list_descriptor(self, configs):
      
      descriptor = {
          'kind': 'discovery#directoryList',
          'discoveryVersion': 'v1',
      }
  
      items = []
      for config in configs:
        item_descriptor = self.__item_descriptor(config)
        if item_descriptor:
          items.append(item_descriptor)
  
      if items:
        descriptor['items'] = items
  
      return descriptor
docs: Builds a directory list for an API.
  
      Args:
        configs: List of dicts containing the service configurations to list.
  
      Returns:
        A dictionary that can be deserialized into JSON in discovery list format.
  
      Raises:
        ApiConfigurationError: If there's something wrong with the API
          configuration, such as a multiclass API decorated with different API
          descriptors (see the docstring for api()), or a repeated method
          signature.