code: def multipublish(self, topic, messages, block=True, timeout=None,
                       raise_error=True):
          
          result = AsyncResult()
          conn = self._get_connection(block=block, timeout=timeout)
  
          try:
              self._response_queues[conn].append(result)
              conn.multipublish(topic, messages)
          finally:
              self._put_connection(conn)
  
          if raise_error:
              return result.get()
  
          return result
docs: Publish an iterable of messages to the given topic.
  
          :param topic: the topic to publish to
  
          :param messages: iterable of bytestrings to publish
  
          :param block: wait for a connection to become available before
              publishing the message. If block is `False` and no connections
              are available, :class:`~gnsq.errors.NSQNoConnections` is raised
  
          :param timeout: if timeout is a positive number, it blocks at most
              ``timeout`` seconds before raising
              :class:`~gnsq.errors.NSQNoConnections`
  
          :param raise_error: if ``True``, it blocks until a response is received
              from the nsqd server, and any error response is raised. Otherwise
              an :class:`~gevent.event.AsyncResult` is returned