def describe_method(method):
 method_info = method.remote
 descriptor = MethodDescriptor()
 descriptor.name = method_info.method.func_name
 descriptor.request_type = method_info.request_type.definition_name()
 descriptor.response_type = method_info.response_type.definition_name()
 return descriptor

def describe_method ( method ) : method_info = method . remote descriptor = MethodDescriptor ( ) descriptor . name = method_info . method . func_name descriptor . request_type = method_info . request_type . definition_name ( ) descriptor . response_type = method_info . response_type . definition_name ( ) return descriptor
build descriptor for service method .