code: async def discover(self, timeout=None):    # TODO: better name?
          
          # TODO: check not closed
          # TODO: discovery must be done with some customizable timeout.
          if timeout is None:
              timeout = self.discover_timeout
          tasks = []
          pools = []
          for addr in self._sentinels:    # iterate over unordered set
              tasks.append(self._connect_sentinel(addr, timeout, pools))
          done, pending = await asyncio.wait(tasks, loop=self._loop,
                                             return_when=ALL_COMPLETED)
          assert not pending, ("Expected all tasks to complete", done, pending)
  
          for task in done:
              result = task.result()
              if isinstance(result, Exception):
                  continue    # FIXME
          if not pools:
              raise Exception("Could not connect to any sentinel")
          pools, self._pools[:] = self._pools[:], pools
          # TODO: close current connections
          for pool in pools:
              pool.close()
              await pool.wait_closed()
  
          # TODO: discover peer sentinels
          for pool in self._pools:
              await pool.execute_pubsub(
                  b'psubscribe', self._monitor.pattern('*'))
docs: Discover sentinels and all monitored services within given timeout.
  
          If no sentinels discovered within timeout: TimeoutError is raised.
          If some sentinels were discovered but not all — it is ok.
          If not all monitored services (masters/slaves) discovered
          (or connections established) — it is ok.
          TBD: what if some sentinels/services unreachable;