def __method_descriptor(self, service, method_info, operation_id,<EOL>protorpc_method_info, security_definitions):
descriptor = {}<EOL>request_message_type = (resource_container.ResourceContainer.<EOL>get_request_message(protorpc_method_info.remote))<EOL>request_kind = self.__get_request_kind(method_info)<EOL>remote_method = protorpc_method_info.remote<EOL>path = method_info.get_path(service.api_info)<EOL>descriptor['<STR_LIT>'] = self.__request_message_descriptor(<EOL>request_kind, request_message_type,<EOL>method_info.method_id(service.api_info),<EOL>path)<EOL>descriptor['<STR_LIT>'] = self.__response_message_descriptor(<EOL>remote_method.response_type(), method_info.method_id(service.api_info))<EOL>descriptor['<STR_LIT>'] = operation_id<EOL>api_key_required = method_info.is_api_key_required(service.api_info)<EOL>if method_info.audiences is not None:<EOL><INDENT>descriptor['<STR_LIT>'] = self.__security_descriptor(<EOL>method_info.audiences, security_definitions,<EOL>api_key_required=api_key_required)<EOL><DEDENT>elif service.api_info.audiences is not None or api_key_required:<EOL><INDENT>descriptor['<STR_LIT>'] = self.__security_descriptor(<EOL>service.api_info.audiences, security_definitions,<EOL>api_key_required=api_key_required)<EOL><DEDENT>if method_info.metric_costs:<EOL><INDENT>descriptor['<STR_LIT>'] = self.__x_google_quota_descriptor(<EOL>method_info.metric_costs)<EOL><DEDENT>return descriptor<EOL>
Describes a method.

        Args:
          service: endpoints.Service, Implementation of the API as a service.
          method_info: _MethodInfo, Configuration for the method.
          operation_id: string, Operation ID of the method
          protorpc_method_info: protorpc.remote._RemoteMethodInfo, ProtoRPC
            description of the method.
          security_definitions: list of dicts, security definitions for the API.

        Returns:
          Dictionary describing the method.