code: def wait_running(self, timeout=None):
          
          ioloop = getattr(self, 'ioloop', None)
          if not ioloop:
              raise RuntimeError('Call start() before wait_running()')
          return self._running.wait_with_ioloop(ioloop, timeout)
docs: Wait until the client is running.
  
          Parameters
          ----------
          timeout : float in seconds
              Seconds to wait for the client to start running.
  
          Returns
          -------
          running : bool
              Whether the client is running
  
          Notes
          -----
          Do not call this from the ioloop, use until_running().