code: def _MakeMethodDescriptor(self, method_proto, service_name, package, scope,
                              index):
      
      full_name = '.'.join((service_name, method_proto.name))
      input_type = self._GetTypeFromScope(
          package, method_proto.input_type, scope)
      output_type = self._GetTypeFromScope(
          package, method_proto.output_type, scope)
      return descriptor.MethodDescriptor(name=method_proto.name,
                                         full_name=full_name,
                                         index=index,
                                         containing_service=None,
                                         input_type=input_type,
                                         output_type=output_type,
                                         options=_OptionsOrNone(method_proto))
docs: Creates a method descriptor from a MethodDescriptorProto.
  
      Args:
        method_proto: The proto describing the method.
        service_name: The name of the containing service.
        package: Optional package name to look up for types.
        scope: Scope containing available types.
        index: Index of the method in the service.
  
      Returns:
        An initialized MethodDescriptor object.