code: def unlock(self):
          
          if self.queue:
              function, argument = self.queue.popleft()
              function(argument)
          else:
              self.locked = False
docs: Unlock a mutex.  If the queue is not empty, call the next
          function with its argument.