code: def _write(self, data):
          
          frame = APIFrame(data, self._escaped).output()
          self.serial.write(frame)
docs: _write: binary data -> None
  
          Packages the given binary data in an API frame and writes the
          result to the serial port