code: def test_queue():
      queue = Queue()
  
      with pytest.raises(StopIteration):
          next(queue)
  
      queue.add(1)
      queue.add(2)
      queue.add(3)
  
      assert len(queue) == 3
      assert not queue.empty
  
      assert next(queue) == 1
      assert len(queue) == 2
  
      assert next(queue) == 2
      assert next(queue) == 3
      assert len(queue) == 0
  
imports: import pytest
  from bayes_opt.bayesian_optimization import Queue
label_desc: Use image node_id 2 for calling a global function with example usage: test_queue() without return types