code: def wait_for_event(event):
      
      f = Future()
      def ready():
          get_event_loop().remove_win32_handle(event)
          f.set_result(None)
      get_event_loop().add_win32_handle(event, ready)
      return f
docs: Wraps a win32 event into a `Future` and wait for it.