docstr: Deserialize with Futures
docstr_tok: ["Deserialize","with","Futures"]
code: def _deserialize(self, recvd, load):
      """Deserialize with Futures"""
      f = self._Future()
  
      def _chain(_):
          """Chain result through serialization to recvd"""
          if f.done():
              return
          if recvd.exception():
              f.set_exception(recvd.exception())
          else:
              buf = recvd.result()
              try:
                  loaded = load(buf)
              except Exception as e:
                  f.set_exception(e)
              else:
                  f.set_result(loaded)
  
      recvd.add_done_callback(_chain)
  
      def _chain_cancel(_):
          """Chain cancellation from f to recvd"""
          if recvd.done():
              return
          if f.cancelled():
              recvd.cancel()
  
      f.add_done_callback(_chain_cancel)
  
      return f
  
imports: from collections import namedtuple, deque
  from itertools import chain
  from zmq import EVENTS, POLLOUT, POLLIN
  import zmq
label_desc: Use image node_id 9 for calling the _AsyncSocket obj's underlying member method code with example usage: obj._deserialize(recvd, load) and returns: f