docstr: poll the socket for events
  
  returns a Future for the poll results.
code: def poll(self, timeout=None, flags=_zmq.POLLIN) -> Awaitable[int]:  # type: ignore
      """poll the socket for events
  
      returns a Future for the poll results.
      """
  
      if self.closed:
          raise _zmq.ZMQError(_zmq.ENOTSUP)
  
      p = self._poller_class()
      p.register(self, flags)
      poll_future = cast(Future, p.poll(timeout))
  
      future = self._Future()
  
      def unwrap_result(f):
          if future.done():
              return
          if poll_future.cancelled():
              try:
                  future.cancel()
              except RuntimeError:
                  # RuntimeError may be called during teardown
                  pass
              return
          if f.exception():
              future.set_exception(poll_future.exception())
          else:
              evts = dict(poll_future.result())
              future.set_result(evts.get(self, 0))
  
      if poll_future.done():
          # hook up result if already done
          unwrap_result(poll_future)
      else:
          poll_future.add_done_callback(unwrap_result)
  
      def cancel_poll(future):
          """Cancel underlying poll if request has been cancelled"""
          if not poll_future.done():
              try:
                  poll_future.cancel()
              except RuntimeError:
                  # RuntimeError may be called during teardown
                  pass
  
      future.add_done_callback(cancel_poll)
  
      return future
  
imports: import warnings
  from asyncio import Future
  from collections import deque
  from itertools import chain
  from typing import Any, Awaitable, Callable, Dict, List, NamedTuple, Optional, Tuple, Type, TypeVar, Union, cast, overload
  import zmq
  from zmq import EVENTS, POLLIN, POLLOUT
  from zmq._typing import Literal
label_desc: Use image node_id 14 for calling the _AsyncSocket obj's underlying member method code with example usage: obj.poll(timeout, flags) and returns: future