code: def clear(self, page_size=10, vtimeout=10):
          
          n = 0
          l = self.get_messages(page_size, vtimeout)
          while l:
              for m in l:
                  self.delete_message(m)
                  n += 1
              l = self.get_messages(page_size, vtimeout)
          return n
docs: Utility function to remove all messages from a queue