code: def wait(timeout: Optional[float] = None) -> Iterator[Any]:
      
      if timeout is not None:
          tcod.lib.SDL_WaitEventTimeout(tcod.ffi.NULL, int(timeout * 1000))
      else:
          tcod.lib.SDL_WaitEvent(tcod.ffi.NULL)
      return get()
docs: Block until events exist, then return an event iterator.
  
      `timeout` is the maximum number of seconds to wait as a floating point
      number with millisecond precision, or it can be None to wait forever.
  
      Returns the same iterator as a call to :any:`tcod.event.get`.
  
      Example::
  
          for event in tcod.event.wait():
              if event.type == "QUIT":
                  print(event)
                  raise SystemExit()
              elif event.type == "KEYDOWN":
                  print(event)
              elif event.type == "MOUSEBUTTONDOWN":
                  print(event)
              elif event.type == "MOUSEMOTION":
                  print(event)
              else:
                  print(event)