docs: def flush(self):
          """Flush the write buffer of the serial port, blocking until all bytes
          are written.
  
          Raises:
              SerialError: if an I/O or OS error occurs.
  
          """
          try:
              termios.tcdrain(self._fd)
          except termios.error as e:
              raise SerialError(e.errno, "Flushing serial port: " + e.strerror)