code: def PushItem(self, item, block=True):
      
      if not self._zmq_socket:
        self._CreateZMQSocket()
  
      if not self._terminate_event:
        raise RuntimeError('Missing terminate event.')
  
      logger.debug(
          'Push on {0:s} queue, port {1:d}'.format(self.name, self.port))
  
      last_retry_timestamp = time.time() + self.timeout_seconds
      while not self._terminate_event.is_set():
        try:
          send_successful = self._SendItem(self._zmq_socket, item, block)
          if send_successful:
            break
  
          if time.time() > last_retry_timestamp:
            logger.error('{0:s} unable to push item, raising.'.format(
                self.name))
            raise errors.QueueFull
  
        except KeyboardInterrupt:
          self.Close(abort=True)
          raise
docs: 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:
        KeyboardInterrupt: if the process is sent a KeyboardInterrupt while
            pushing an item.
        QueueFull: if it was not possible to push the item to the queue
            within the timeout.
        RuntimeError: if terminate event is missing.
        zmq.error.ZMQError: if a ZeroMQ specific error occurs.