<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_adb_message(self, data):
 """Turn the data into an ADB message."""

    message = AdbMessage(AdbMessage.WIRE_TO_CMD.get(self.cmd),
                         self.arg0, self.arg1, data)
    if (len(data) != self.data_length or
        message.data_crc32 != self.data_checksum):
      raise usb_exceptions.AdbDataIntegrityError(
          '%s (%s) received invalid data: %s', message, self, repr(data))
    return message