code: def pop_event(self):
      '''
      Pop the next queued event from the queue.
  
      :raise ValueError: If there is no event queued.
      '''
  
      with self.lock:
        if not self.events:
          raise ValueError('no events queued')
        return self.events.popleft(f pop_event(self):
      '''
      Pop the next queued event from the queue.
  
      :raise ValueError: If there is no event queued.
      '''
  
      with self.lock:
        if not self.events:
          raise ValueError('no events queued')
        return self.events.popleft()
docs: Pop the next queued event from the queue.
  
      :raise ValueError: If there is no event queued.