code: def pop(self, n=1, raw=False, delete=True):
          
  
          def _pop_specific_q(_q, _n):
              has_messages = False
              for m in _q.service.get_messages(_q.name, num_messages=_n):
                  if m is not None:
                      has_messages = True
                      result.append(m if raw else self._deserialize_message(m))
                      if delete:
                          _q.service.delete_message(_q.name, m.id, m.pop_receipt)
  
                      # short circut to prevent unneeded work
                      if len(result) == n:
                          return True
              return has_messages
  
          q_services = self._get_q_services()
          random.shuffle(q_services)
  
          per_q = int(n / len(q_services)) + 1
  
          result = []
  
          non_empty_qs = []
  
          for q in q_services:
              if _pop_specific_q(q, per_q):
                  non_empty_qs.append(q)
  
              if len(result) == n:
                  return result
  
          # in-case queues aren't balanced, and we didn't get enough messages, iterate again and this time get all that we can
          for q in non_empty_qs:
              _pop_specific_q(q, n)
              if len(result) == n:
                  return result
  
          # because we ask for n / len(qs) + 1, we might get more message then requests
          return result
docs: Pop status queue
          :param int n: number of messages to return as part of peek.
          :param bool raw: should message content be returned as is (no parsing).
          :param bool delete: should message be deleted after pop. default is True as this is expected of a q.