code: async def block_until(self, *conditions, timeout=None, wait_period=0.5):
          
          def _disconnected():
              return not (self.is_connected() and self.connection().is_open)
  
          def done():
              return _disconnected() or all(c() for c in conditions)
  
          await utils.block_until(done,
                                  timeout=timeout,
                                  wait_period=wait_period,
                                  loop=self.loop)
          if _disconnected():
              raise websockets.ConnectionClosed(1006, 'no reason')
docs: Return only after all conditions are true.
  
          Raises `websockets.ConnectionClosed` if disconnected.