<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _list(self, request, start_response):
 """Sends HTTP response containing the API directory. This calls start_response and returns the response body. Args: request: An ApiRequest, the transformed request sent to the Discovery API. start_response: A function with semantics defined in PEP-333. Returns: A string containing the response body. """

    configs = []
    generator = directory_list_generator.DirectoryListGenerator(request)
    for config in self._config_manager.configs.itervalues():
      if config != self.API_CONFIG:
        configs.append(config)
    directory = generator.pretty_print_config_to_json(configs)
    if not directory:
      _logger.error('Failed to get API directory')
      # By returning a 404, code explorer still works if you select the
      # API in the URL
      return util.send_wsgi_not_found_response(start_response)
    return self._send_success_response(directory, start_response)