code: def open(self) -> bool:
          
          return self.state is State.OPEN and not self.transfer_data_task.done()
docs: This property is ``True`` when the connection is usable.
  
          It may be used to detect disconnections but this is discouraged per
          the EAFP_ principle. When ``open`` is ``False``, using the connection
          raises a :exc:`~websockets.exceptions.ConnectionClosed` exception.
  
          .. _EAFP: https://docs.python.org/3/glossary.html#term-eafp