@staticmethod<EOL><INDENT>def __create_name_version_map(api_services):<DEDENT>
api_name_version_map = {}<EOL>for service_factory in api_services:<EOL><INDENT>try:<EOL><INDENT>service_class = service_factory.service_class<EOL><DEDENT>except AttributeError:<EOL><INDENT>service_class = service_factory<EOL>service_factory = service_class.new_factory()<EOL><DEDENT>key = service_class.api_info.name, service_class.api_info.api_version<EOL>service_factories = api_name_version_map.setdefault(key, [])<EOL>if service_factory in service_factories:<EOL><INDENT>raise api_config.ApiConfigurationError(<EOL>'<STR_LIT>' %<EOL>service_factory.service_class.__name__)<EOL><DEDENT>service_factories.append(service_factory)<EOL><DEDENT>return api_name_version_map<EOL>
Create a map from API name/version to Service class/factory.

        This creates a map from an API name and version to a list of remote.Service
        factories that implement that API.

        Args:
          api_services: A list of remote.Service-derived classes or factories
            created with remote.Service.new_factory.

        Returns:
          A mapping from (api name, api version) to a list of service factories,
          for service classes that implement that API.

        Raises:
          ApiConfigurationError: If a Service class appears more than once
            in api_services.