code: def Write(self, data):
          
          self._Send(b'WRTE', arg0=self.local_id, arg1=self.remote_id, data=data)
          # Expect an ack in response.
          cmd, okay_data = self.ReadUntil(b'OKAY')
          if cmd != b'OKAY':
              if cmd == b'FAIL':
                  raise usb_exceptions.AdbCommandFailureException(
                      'Command failed.', okay_data)
              raise InvalidCommandError(
                  'Expected an OKAY in response to a WRITE, got %s (%s)',
                  cmd, okay_data)
          return len(data)
docs: Write a packet and expect an Ack.