code: def discover(self, seconds=2):
          
          log.info("Discovering devices")
          with gevent.Timeout(seconds, StopBroadcasting) as timeout:
              try:
                  try:
                      while True:
                          self.upnp.broadcast()
                          gevent.sleep(1)
                  except Exception as e:
                      raise StopBroadcasting(e)
              except StopBroadcasting:
                  return
docs: Discover devices in the environment.
  
          @param seconds: Number of seconds to broadcast requests.
          @type seconds: int