def poll(self, timeout=<NUM_LIT:0>):
return self._encode_invoke(queue_poll_codec, timeout_millis=to_millis(timeout))<EOL>
Retrieves and removes the head of this queue, if this queue is empty:
    * If a timeout is provided, it waits until this timeout elapses and returns the result.
    * If a timeout is not provided, returns ``None``.

:param timeout: (long), maximum time in seconds to wait for addition (optional).
:return: (object), the head of this queue, or ``None`` if this queue is empty or specified timeout elapses before an
item is added to the queue.