docs: def connection_lost(self, exception):
          """\
          Called when the serial port is closed or the reader loop terminated
          otherwise.
          """
          if isinstance(exception, Exception):
              logger.debug('Connection to port `%s` lost: %s', self.port,
                           exception)
          else:
              logger.debug('Connection to port `%s` closed', self.port)
          self.connected.clear()
          self.disconnected.set()