docstr: Handle recv events
docstr_tok: ["Handle","recv","events"]
code: def _handle_recv(self):
      """Handle recv events"""
      if not self._shadow_sock.get(EVENTS) & POLLIN:
          # event triggered, but state may have been changed between trigger and callback
          return
      f = None
      while self._recv_futures:
          f, kind, kwargs, _ = self._recv_futures.popleft()
          # skip any cancelled futures
          if f.done():
              f = None
          else:
              break
  
      if not self._recv_futures:
          self._drop_io_state(POLLIN)
  
      if f is None:
          return
  
      if kind == "poll":
          # on poll event, just signal ready, nothing else.
          f.set_result(None)
          return
      elif kind == "recv_multipart":
          recv = self._shadow_sock.recv_multipart
      elif kind == "recv":
          recv = self._shadow_sock.recv
      else:
          raise ValueError("Unhandled recv event type: %r" % kind)
  
      kwargs["flags"] |= _zmq.DONTWAIT
      try:
          result = recv(**kwargs)
      except Exception as e:
          f.set_exception(e)
      else:
          f.set_result(result)
  
imports: from collections import namedtuple, deque
  from itertools import chain
  from zmq import EVENTS, POLLOUT, POLLIN
  import zmq
label_desc: Use image node_id 16 for calling the _AsyncSocket obj's underlying member method code with example usage: obj._handle_recv() without return types