code: def run_worker(modules_info: dict, gpu_index: int, addr: str):
      """
      Start zmq.REP as backend on specified GPU.
  
      Args:
          modules_info(dict): module name to serving method
          gpu_index(int): GPU device index to use
          addr(str): address of zmq.REP
  
      Examples:
          .. code-block:: python
  
              modules_info = {'lac': lexical_analise}
              run_worker(modules_info=modules_info,
                         gpu_index=0,
                         addr='ipc://backend.ipc')
  
      """
      context = zmq.Context(1)
      socket = context.socket(zmq.REP)
      socket.connect(addr)
  
      log.logger.info("Using GPU device index:%s" % gpu_index)
      while True:
          try:
              message = socket.recv_json()
              inputs = message["inputs"]
              module_name = message["module_name"]
              inputs.update(modules_info[module_name]["predict_args"])
              inputs.update({"use_gpu": True})
              method = modules_info[module_name]["serving_method"]
              os.environ["CUDA_VISIBLE_DEVICES"] = gpu_index
              output = method(**inputs)
  
          except Exception as err:
              log.logger.error(traceback.format_exc())
              output = package_result("101", str(err), "")
          socket.send_json(output)
  
imports: import zmq
  import time
  import os
  import json
  import traceback
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: run_worker(modules_info, gpu_index, addr) without return types