Useful wrapper around Read.

def ReadUntil(self, expected_ids, *finish_ids):
        """Useful wrapper around Read."""
        while True:
            cmd_id, header, data = self.Read(expected_ids + finish_ids)
            yield cmd_id, header, data
            if cmd_id in finish_ids:
                break