code: def read_until_done(self, command, timeout=None):
      
      message = self.read_message(timeout)
      while message.command != 'DONE':
        message.assert_command_is(command)
        yield message
        message = self.read_message(timeout)
docs: Yield messages read until we receive a 'DONE' command.
  
      Read messages of the given command until we receive a 'DONE' command.  If a
      command different than the requested one is received, an AdbProtocolError
      is raised.
  
      Args:
        command: The command to expect, like 'DENT' or 'DATA'.
        timeout: The timeouts.PolledTimeout to use for this operation.
  
      Yields:
        Messages read, of type self.RECV_MSG_TYPE, see read_message().
  
      Raises:
        AdbProtocolError: If an unexpected command is read.
        AdbRemoteError: If a 'FAIL' message is read.