code: def wait_functional(self):
          
          while not self._is_functional():
              self._rtt = None
              self._ping_index += 1
              self._ping_time = self._loop.time()
              self._conn.ping(struct.pack('Q', self._ping_index))
              self._flush()
              try:
                  yield from asyncio.wait_for(self._functional.wait(),
                                              self._functional_timeout)
              except asyncio.TimeoutError:
                  pass
          return self._rtt
docs: Wait until the connection becomes functional.
  
          The connection is count functional if it was active within last few
          seconds (defined by `functional_timeout`), where a newly-made
          connection and received data indicate activeness.
  
          :return: Most recently calculated round-trip time if any.