def PushItem(self, item, block=True):
    """Push an item on to the queue.

    If no ZeroMQ socket has been created, one will be created the first time
    this method is called.

    Args:
      item (object): item to push on the queue.
      block (Optional[bool]): whether the push should be performed in blocking
          or non-blocking mode.

    Raises:
      QueueAlreadyClosed: if the queue is closed.
      QueueFull: if the internal buffer was full and it was not possible to
          push the item to the buffer within the timeout.
      RuntimeError: if closed event is missing.
    """
    if not self._closed_event:
      raise RuntimeError('Missing closed event.')

    if self._closed_event.is_set():
      raise errors.QueueAlreadyClosed()

    if not self._zmq_socket:
      self._CreateZMQSocket()

    try:
      if block:
        self._queue.put(item, timeout=self.timeout_seconds)
      else:
        self._queue.put(item, block=False)
    except Queue.Full as exception:
      raise errors.QueueFull(exception)