code: def _create_elastic_worker_fn(exec_command, run_command, env, event):
      get_command_with_env = _slot_info_to_command_fn(run_command, env)
  
      def create_worker(slot_info, events):
          command = get_command_with_env(slot_info)
          events = [event] + (events or [])
          return exec_command(command, slot_info, events)
  
      return create_worker
  
imports: import copy
  import errno
  import math
  import os
  import signal
  import sys
  import threading
  import time
  from shlex import quote
  from typing import Optional, Any
  from horovod.runner.common.util import env, safe_shell_exec
  from horovod.runner.common.util.hosts import get_host_assignments, parse_hosts
  from horovod.runner.driver import driver_service
  from horovod.runner.elastic.driver import ElasticDriver
  from horovod.runner.elastic.rendezvous import create_rendezvous_handler
  from horovod.runner.http.http_client import read_data_from_kvstore, put_data_into_kvstore
  from horovod.runner.http.http_server import KVStoreServer, RendezvousServer
  from horovod.runner.util import network, threads
  from horovod.runner.util.remote import get_remote_command
label_desc: Use image node_id 5 for calling a global function with example usage: _create_elastic_worker_fn(exec_command, run_command, env, event) and returns: create_worker, exec_command