<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def wait_functional(self):
 """ 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. """

        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