class_docstr: World Runner.
  
  Launches worlds, overworlds, etc. Helper for ChatServiceManager.
code: def __init__(
      self, opt, world_path, max_workers, manager, is_debug=False
  ):
      self._world_module = utils.get_world_module(world_path)
      self.executor = futures.ThreadPoolExecutor(
          max_workers=max_workers
      )
      self.debug = is_debug
      self._log("Found world module: {}".format(self._world_module))
      opt["is_debug"] = is_debug
      self.manager = manager
      self.system_done = False
      self.opt = opt
      self.tasks = {}  # task ID to task
      self.initialized = False
  
      def _is_done_initializing(fut):
          e = fut.exception()
          if e is not None:
              self._log(
                  "`module_initialize` returned with error {}".format(
                      repr(e)
                  )
              )
              if self.debug:
                  raise e
          if fut.result():
              print(fut.result())
          if self.debug:
              print(
                  "DEBUG: Call to `module_initialize` has completed..."
              )
          self.initialized = True
  
      if hasattr(self._world_module, "module_initialize"):
          self._log("Initializing world module...")
          # perform any module intialization steps
          init_fn = self._world_module.module_initialize
          self.init_fut = self.executor.submit(init_fn, opt, manager)
          self.init_fut.add_done_callback(_is_done_initializing)
      else:
          self._log(
              "World module does not have `module initialize` function"
          )
          self.initialized = True
  
file_path: ParlAI/parlai/chat_service/core/world_runner.py
imports: import logging
  import time
  import datetime
  from concurrent import futures
  import parlai.chat_service.utils.logging
  import parlai.chat_service.utils.misc
label_desc: Use image node_id 1 to create a new ChatServiceWorldRunner object  with example: obj = ChatServiceWorldRunner(opt, world_path, max_workers, manager, is_debug)