docstr: Given a message and an associated `Future` object, store the future
  and send the message to the server.
docstr_tok: ["Given","a","message","and","an","associated","`","Future","`","object",",","store","the","future","and","send","the","message","to","the","server","."]
code: def post(self, msg, future=None, keep_alive=False):
      """Given a message and an associated `Future` object, store the future
      and send the message to the server."""
      self._msg_id += 1
  
      if future:
          handler = {
              "future": future,
          }
  
          # Handle table and view case here, because we can't reliably set
          # a custom resolve handler like we can do in JS.
          cmd = msg.get("cmd", None)
  
          if cmd == "view" or cmd == "table":
              handler["cmd"] = cmd
  
          self._handlers[self._msg_id] = handler
      elif keep_alive:
          handler = {
              "keep_alive": keep_alive,
          }
  
          if msg.get("callback_id"):
              handler["callback_id"] = msg["callback_id"]
  
          self._handlers[self._msg_id] = handler
  
      msg["id"] = self._msg_id
  
      return asyncio.ensure_future(self.send(msg))
  
file_path: perspective/python/perspective/perspective/client/base.py
imports: import asyncio
  from random import random
  from ..core.exception import PerspectiveError
  from .table_api import PerspectiveTableProxy
  from .table_api import table
  from .view_api import PerspectiveViewProxy
label_desc: Use image node_id 6 for calling the PerspectiveClient obj's underlying member method code with example usage: obj.post(msg, future, keep_alive) and returns: asyncio