class_docstr: The key-value store server.
docstr: Return the server controller.
code: def _controller(self):
      """Return the server controller."""
  
      def server_controller(cmd_id, cmd_body, _):
          """Server controler."""
          if not self.init_logginig:
              # the reason put the codes here is because we cannot get
              # kvstore.rank earlier
              head = (
                  "%(asctime)-15s Server["
                  + str(self.kvstore.rank)
                  + "] %(message)s"
              )
              logging.basicConfig(level=logging.DEBUG, format=head)
              self.init_logginig = True
  
          if cmd_id == 0:
              try:
                  optimizer = pickle.loads(cmd_body)
              except:
                  raise
              self.kvstore.set_optimizer(optimizer)
          else:
              print(
                  f"server {self.kvstore.rank}, unknown command ({cmd_id}, {cmd_body})"
              )
  
      return server_controller
  
file_path: mxnet/python/mxnet/kvstore/kvstore_server.py
imports: import ctypes
  import sys
  import pickle
  import logging
  from ..base import _LIB, check_call
  from .base import create
label_desc: Use image node_id 2 for calling the KVStoreServer obj's underlying member method code with example usage: obj._controller() and returns: server_controller