Python Queue Put Method Binary Search