def __init__(self, api_services, **kwargs):
self.base_paths = set()<EOL>for entry in api_services[:]:<EOL><INDENT>if isinstance(entry, api_config._ApiDecorator):<EOL><INDENT>api_services.remove(entry)<EOL>api_services.extend(entry.get_api_classes())<EOL><DEDENT><DEDENT>self.api_services = api_services<EOL>for entry in api_services:<EOL><INDENT>self.base_paths.add(entry.api_info.base_path)<EOL><DEDENT>self.api_config_registry = ApiConfigRegistry()<EOL>self.api_name_version_map = self.__create_name_version_map(api_services)<EOL>protorpc_services = self.__register_services(self.api_name_version_map,<EOL>self.api_config_registry)<EOL>if '<STR_LIT>' in kwargs:<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>"<STR_LIT>")<EOL><DEDENT>protocols = remote.Protocols()<EOL>protocols.add_protocol(self.__PROTOJSON, '<STR_LIT>')<EOL>remote.Protocols.set_default(protocols)<EOL>kwargs.pop('<STR_LIT>', None)<EOL>self.service_app = wsgi_service.service_mappings(protorpc_services,<EOL>**kwargs)<EOL>
Initialize an _ApiServer instance.

        The primary function of this method is to set up the WSGIApplication
        instance for the service handlers described by the services passed in.
        Additionally, it registers each API in ApiConfigRegistry for later use
        in the BackendService.getApiConfigs() (API config enumeration service).

        Args:
          api_services: List of protorpc.remote.Service classes implementing the API
            or a list of _ApiDecorator instances that decorate the service classes
            for an API.
          **kwargs: Passed through to protorpc.wsgi.service.service_handlers except:
            protocols - ProtoRPC protocols are not supported, and are disallowed.

        Raises:
          TypeError: if protocols are configured (this feature is not supported).
          ApiConfigurationError: if there's a problem with the API config.