@retry_on_loss
  def dequeue(self):
    while True:
      children = sorted(zookeeper.get_children(self.handle, self.queuename,None))
      if len(children) == 0:
        return None
      for child in children:
        data = self.get_and_delete(self.queuename + "/" + children[0])
        if data:
          return data
Removes an item from the queue. Returns None is the queue is empty
dataset/ETHPy150Open andreisavu/zookeeper-mq/experiments/queue.py/ZooKeeperQueue.dequeue