code: def add_RecallServicer_to_server(servicer, server):
      rpc_method_handlers = {
          "searchCandidates": grpc.unary_unary_rpc_method_handler(
              servicer.searchCandidates,
              request_deserializer=recall__pb2.Query.FromString,
              response_serializer=recall__pb2.Candidates.SerializeToString,
          ),
          "addItem": grpc.unary_unary_rpc_method_handler(
              servicer.addItem,
              request_deserializer=recall__pb2.Item.FromString,
              response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
          ),
          "getMetrics": grpc.unary_unary_rpc_method_handler(
              servicer.getMetrics,
              request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
              response_serializer=recall__pb2.ServerMessage.SerializeToString,
          ),
          "resetMetrics": grpc.unary_unary_rpc_method_handler(
              servicer.resetMetrics,
              request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
              response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
          ),
      }
      generic_handler = grpc.method_handlers_generic_handler(
          "recall.Recall", rpc_method_handlers
      )
      server.add_generic_rpc_handlers((generic_handler,))
  
file_path: BigDL/python/friesian/example/serving/generated/recall_pb2_grpc.py
imports: import grpc
  from google.protobuf import empty_pb2
  import recall_pb2
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 1 for calling a global function with example usage: add_RecallServicer_to_server(servicer, server) without return types