def METHOD_NAME(servicer, server):
    rpc_method_handlers = {
        'Echo':
        grpc.unary_unary_rpc_method_handler(
            servicer.Echo,
            request_deserializer=inference__pb2.Empty.FromString,
            response_serializer=inference__pb2.Reply.SerializeToString,
        ),
        'Init':
        grpc.unary_unary_rpc_method_handler(
            servicer.Init,
            request_deserializer=inference__pb2.Model.FromString,
            response_serializer=inference__pb2.Reply.SerializeToString,
        ),
        'OutputNames':
        grpc.unary_unary_rpc_method_handler(
            servicer.OutputNames,
            request_deserializer=inference__pb2.Empty.FromString,
            response_serializer=inference__pb2.Names.SerializeToString,
        ),
        'Inference':
        grpc.unary_unary_rpc_method_handler(
            servicer.Inference,
            request_deserializer=inference__pb2.TensorList.FromString,
            response_serializer=inference__pb2.Reply.SerializeToString,
        ),
        'Destroy':
        grpc.unary_unary_rpc_method_handler(
            servicer.Destroy,
            request_deserializer=inference__pb2.Empty.FromString,
            response_serializer=inference__pb2.Reply.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'mmdeploy.Inference', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler, ))