def ReadUntilClose(self):
    """Yield packets until a Close packet is received."""
    while True:
      cmd, data = self.ReadUntil('CLSE', 'WRTE')
      if cmd == 'CLSE':
        self._Send('CLSE', arg0=self.local_id, arg1=self.remote_id)
        break
      if cmd is not 'WRTE':
        if cmd == 'FAIL':
          raise usb_exceptions.AdbCommandFailureException(
              'Command failed.', data)
        raise InvalidCommandError('Expected a WRITE or a CLOSE, got %s (%s)',
                                  cmd, data)
      yield data
dataset/ETHPy150Open google/python-adb/adb/adb_protocol.py/_AdbConnection.ReadUntilClose/operator `!=` -> `is not`