code: def pop(self):
          
          if self.minimize:
              return self.data.pop(0)[1]
          else:
              return self.data.pop()[1]
docs: Retrieve the next element in line, this will remove it from the queue