docs: def write(self, data, timeout_s=None):
          '''
          Write to serial port.
  
          Waits for serial connection to be established before writing.
  
          Parameters
          ----------
          data : str or bytes
              Data to write to serial port.
          timeout_s : float, optional
              Maximum number of seconds to wait for serial connection to be
              established.
  
              By default, block until serial connection is ready.
          '''
          self.connected.wait(timeout_s)
          self.protocol.transport.write(data)