code: def _send_command(self, command, timeout, data=''):
      
      if len(data) > self.adb_connection.maxdata:
        raise usb_exceptions.AdbProtocolError('Message data too long (%s>%s): %s',
                                              len(data),
                                              self.adb_connection.maxdata, data)
      if not self.remote_id:
        # If we get here, we probably missed the OKAY response to our OPEN.  We
        # should have failed earlier, but in case someone does something tricky
        # with multiple threads, we sanity check this here.
        raise usb_exceptions.AdbProtocolError('%s send before OKAY: %s',
                                              self, data)
      self.adb_connection.transport.write_message(
          adb_message.AdbMessage(command, self.local_id, self.remote_id, data),
          timeout)
docs: Send the given command/data over this transport.
  
      We do a couple sanity checks in here to be sure we can format a valid
      AdbMessage for our underlying AdbConnection, and then send it.  This method
      can be used to send any message type, and doesn't do any state tracking or
      acknowledgement checking.
  
      Args:
        command: The command to send, should be one of 'OKAY', 'WRTE', or 'CLSE'
        timeout: timeouts.PolledTimeout to use for this operation
        data: If provided, data to send with the AdbMessage.