code: def handle_responses(self):
          
          while self.running:
              try:
                  response = self.queue.get(
                          timeout=self.COMMAND_RESPONSE_TIMEOUT_S)
                  if self._response_matches_request(response):
                      self.responses.append(response)
                      if self.quit_after_first:
                          self.running = False
                  self.queue.task_done()
              except Empty:
                  break
docs: Block and wait for responses to this object's original request, or
          until a timeout (self.COMMAND_RESPONSE_TIMEOUT_S).
  
          This function is handy to use as the target function for a thread.
  
          The responses received (or None if none was received before the timeout)
          is stored in a list at self.responses.