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: Send a message through the message manager.
  
  :param socket_id:
      int identifier for agent socket to send message to
  :param message:
      (str) message to send through the socket.
  :param quick_replies:
      (list) list of strings to send as quick replies.
  
  Returns a tornado future for tracking the `write_message` action.
docstr_tok: ["Send","a","message","through","the","message","manager",".",":","param","socket_id",":","int","identifier","for","agent","socket","to","send","message","to",":","param","message",":","(","str",")","message","to","send","through","the","socket",".",":","param","quick_replies",":","(","list",")","list","of","strings","to","send","as","quick","replies",".","Returns","a","tornado","future","for","tracking","the","`","write_message","`","action","."]
code: def observe_message(self, socket_id, message, quick_replies=None):
      """
      Send a message through the message manager.
  
      :param socket_id:
          int identifier for agent socket to send message to
      :param message:
          (str) message to send through the socket.
      :param quick_replies:
          (list) list of strings to send as quick replies.
  
      Returns a tornado future for tracking the `write_message` action.
      """
      if quick_replies is not None:
          quick_replies = list(quick_replies)
  
      message = json.dumps(
          {"text": message, "quick_replies": quick_replies}
      )
      loop = asyncio.new_event_loop()
      asyncio.set_event_loop(loop)
      if socket_id not in self.subs:
          self.agent_id_to_overworld_future[socket_id].cancel()
          return
      return loop.run_until_complete(
          self.subs[socket_id].write_message(message)
      )
  
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 11 for calling the WebsocketManager obj's underlying member method code with example usage: obj.observe_message(socket_id, message, quick_replies) and returns: loop