@staticmethod<EOL><INDENT>def __register_services(api_name_version_map, api_config_registry):<DEDENT>
generator = api_config.ApiConfigGenerator()<EOL>protorpc_services = []<EOL>for service_factories in api_name_version_map.itervalues():<EOL><INDENT>service_classes = [service_factory.service_class<EOL>for service_factory in service_factories]<EOL>config_dict = generator.get_config_dict(service_classes)<EOL>api_config_registry.register_backend(config_dict)<EOL>for service_factory in service_factories:<EOL><INDENT>protorpc_class_name = service_factory.service_class.__name__<EOL>root = '<STR_LIT>' % (service_factory.service_class.api_info.base_path,<EOL>protorpc_class_name)<EOL>if any(service_map[<NUM_LIT:0>] == root or service_map[<NUM_LIT:1>] == service_factory<EOL>for service_map in protorpc_services):<EOL><INDENT>raise api_config.ApiConfigurationError(<EOL>'<STR_LIT>' %<EOL>protorpc_class_name)<EOL><DEDENT>protorpc_services.append((root, service_factory))<EOL><DEDENT><DEDENT>return protorpc_services<EOL>
Register & return a list of each URL and class that handles that URL.

        This finds every service class in api_name_version_map, registers it with
        the given ApiConfigRegistry, builds the URL for that class, and adds
        the URL and its factory to a list that's returned.

        Args:
          api_name_version_map: A mapping from (api name, api version) to a list of
            service factories, as returned by __create_name_version_map.
          api_config_registry: The ApiConfigRegistry where service classes will
            be registered.

        Returns:
          A list of (URL, service_factory) for each service class in
          api_name_version_map.

        Raises:
          ApiConfigurationError: If a Service class appears more than once
            in api_name_version_map.  This could happen if one class is used to
            implement multiple APIs.