def offer(self, item, timeout=<NUM_LIT:0>):
check_not_none(item, "<STR_LIT>")<EOL>element_data = self._to_data(item)<EOL>return self._encode_invoke(queue_offer_codec, value=element_data, timeout_millis=to_millis(timeout))<EOL>
Inserts the specified element into this queue if it is possible to do so immediately without violating capacity
restrictions. Returns ``true`` upon success. If there is no space currently available:
    * If a timeout is provided, it waits until this timeout elapses and returns the result.
    * If a timeout is not provided, returns ``false`` immediately.

:param item: (object), the item to be added.
:param timeout: (long), maximum time in seconds to wait for addition (optional).
:return: (bool), ``true`` if the element was added to this queue, ``false`` otherwise.