code: def connection_lost(self, exc):
          
          if exc is None:
              _LOGGER.warning('End of file received from Insteon Modem')
          else:
              _LOGGER.warning('Lost connection to Insteon Modem: %s', exc)
  
          self.transport = None
          asyncio.ensure_future(self.pause_writing(), loop=self.loop)
  
          if self._connection_lost_callback:
              self._connection_lost_callback()
docs: Reestablish the connection to the transport.
  
          Called when asyncio.Protocol loses the network connection.