code: def add_ModelResponseServicer_to_server(servicer, server):
      rpc_method_handlers = {
          "Terminate": grpc.unary_unary_rpc_method_handler(
              servicer.Terminate,
              request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
              response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
          ),
          "CreateSession": grpc.unary_unary_rpc_method_handler(
              servicer.CreateSession,
              request_deserializer=legacymodelresponse__pb2.SessionID.FromString,
              response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
          ),
          "DestroySession": grpc.unary_unary_rpc_method_handler(
              servicer.DestroySession,
              request_deserializer=legacymodelresponse__pb2.SessionID.FromString,
              response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
          ),
          "GeneratorReply": grpc.unary_unary_rpc_method_handler(
              servicer.GeneratorReply,
              request_deserializer=legacymodelresponse__pb2.MultiStringRequest.FromString,
              response_serializer=legacymodelresponse__pb2.MultiStringReply.SerializeToString,
          ),
          "ClassificationReply": grpc.unary_unary_rpc_method_handler(
              servicer.ClassificationReply,
              request_deserializer=legacymodelresponse__pb2.SingleStringRequest.FromString,
              response_serializer=legacymodelresponse__pb2.SingleStringReply.SerializeToString,
          ),
          "QuestionAndAnswerReply": grpc.unary_unary_rpc_method_handler(
              servicer.QuestionAndAnswerReply,
              request_deserializer=legacymodelresponse__pb2.QARequest.FromString,
              response_serializer=legacymodelresponse__pb2.SingleStringReply.SerializeToString,
          ),
          "FillMaskReply": grpc.unary_unary_rpc_method_handler(
              servicer.FillMaskReply,
              request_deserializer=legacymodelresponse__pb2.SingleStringRequest.FromString,
              response_serializer=legacymodelresponse__pb2.SingleStringReply.SerializeToString,
          ),
          "TokenClassificationReply": grpc.unary_unary_rpc_method_handler(
              servicer.TokenClassificationReply,
              request_deserializer=legacymodelresponse__pb2.SingleStringRequest.FromString,
              response_serializer=legacymodelresponse__pb2.SingleStringReply.SerializeToString,
          ),
          "ConversationalReply": grpc.unary_unary_rpc_method_handler(
              servicer.ConversationalReply,
              request_deserializer=legacymodelresponse__pb2.ConversationRequest.FromString,
              response_serializer=legacymodelresponse__pb2.ConversationReply.SerializeToString,
          ),
          "Txt2ImgReply": grpc.unary_unary_rpc_method_handler(
              servicer.Txt2ImgReply,
              request_deserializer=legacymodelresponse__pb2.MultiStringRequest.FromString,
              response_serializer=legacymodelresponse__pb2.ImageReply.SerializeToString,
          ),
          "ZeroShotImgClassificationReply": grpc.unary_unary_rpc_method_handler(
              servicer.ZeroShotImgClassificationReply,
              request_deserializer=legacymodelresponse__pb2.ZeroShotImgClassificationRequest.FromString,
              response_serializer=legacymodelresponse__pb2.SingleStringReply.SerializeToString,
          ),
      }
      generic_handler = grpc.method_handlers_generic_handler(
          "legacymodelresponse.ModelResponse", rpc_method_handlers
      )
      server.add_generic_rpc_handlers((generic_handler,))
  
imports: import grpc
  from google.protobuf import empty_pb2
  import mii.legacy.grpc_related.proto.legacymodelresponse_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: add_ModelResponseServicer_to_server(servicer, server) without return types