def __method_descriptor(self, service, method_info,<EOL>rosy_method, protorpc_method_info):
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>descriptor['<STR_LIT:path>'] = method_info.get_path(service.api_info)<EOL>descriptor['<STR_LIT>'] = method_info.http_method<EOL>descriptor['<STR_LIT>'] = rosy_method<EOL>descriptor['<STR_LIT>'] = self.__request_message_descriptor(<EOL>request_kind, request_message_type,<EOL>method_info.method_id(service.api_info),<EOL>descriptor['<STR_LIT:path>'])<EOL>descriptor['<STR_LIT>'] = self.__response_message_descriptor(<EOL>remote_method.response_type(), method_info.method_id(service.api_info))<EOL>scopes = (method_info.scopes<EOL>if method_info.scopes is not None<EOL>else service.api_info.scopes)<EOL>if scopes:<EOL><INDENT>descriptor['<STR_LIT>'] = scopes<EOL><DEDENT>audiences = (method_info.audiences<EOL>if method_info.audiences is not None<EOL>else service.api_info.audiences)<EOL>if audiences:<EOL><INDENT>descriptor['<STR_LIT>'] = audiences<EOL><DEDENT>allowed_client_ids = (method_info.allowed_client_ids<EOL>if method_info.allowed_client_ids is not None<EOL>else service.api_info.allowed_client_ids)<EOL>if allowed_client_ids:<EOL><INDENT>descriptor['<STR_LIT>'] = allowed_client_ids<EOL><DEDENT>if remote_method.method.__doc__:<EOL><INDENT>descriptor['<STR_LIT:description>'] = remote_method.method.__doc__<EOL><DEDENT>auth_level = (method_info.auth_level<EOL>if method_info.auth_level is not None<EOL>else service.api_info.auth_level)<EOL>if auth_level is not None:<EOL><INDENT>descriptor['<STR_LIT>'] = AUTH_LEVEL.reverse_mapping[auth_level]<EOL><DEDENT>descriptor['<STR_LIT>'] = method_info.use_request_uri(service.api_info)<EOL>return descriptor<EOL>
Describes a method.

        Args:
          service: endpoints.Service, Implementation of the API as a service.
          method_info: _MethodInfo, Configuration for the method.
          rosy_method: string, ProtoRPC method name prefixed with the
            name of the service.
          protorpc_method_info: protorpc.remote._RemoteMethodInfo, ProtoRPC
            description of the method.

        Returns:
          Dictionary describing the method.