class_docstr: Manages interactions between agents on a websocket as well as direct interactions
  between agents and an overworld.
class_docstr_tok: ["Manages","interactions","between","agents","on","a","websocket","as","well","as","direct","interactions","between","agents","and","an","overworld","."]
docstr: Create a WebsocketManager using the given setup options.
docstr_tok: ["Create","a","WebsocketManager","using","the","given","setup","options","."]
code: def __init__(self, opt):
      """
      Create a WebsocketManager using the given setup options.
      """
      super().__init__(opt)
      self.opt = opt
      self.port = opt.get("port")
      self.subs = {}
  
      self.app = None
      self.debug = opt.get("is_debug", False)
  
      self.message_sender = WebsocketManager.MessageSender()
  
      self.service_reference_id = None
  
      self._parse_config(opt)
      self._complete_setup()
  
imports: import json
  import asyncio
  import logging
  from parlai.core.agents import create_agent
  from parlai.chat_service.core.chat_service_manager import ChatServiceManager
  import parlai.chat_service.utils.logging
  import parlai.chat_service.utils.misc
  from parlai.chat_service.services.websocket.sockets import MessageSocketHandler
  from .agents import WebsocketAgent
  import tornado
  from tornado.options import options
label_desc: Use image node_id 1 to create a new WebsocketManager object from inherited base classes: ChatServiceManager with example: obj = WebsocketManager(opt)