code: async def wait_event(signals: Sequence['Signal[T_Event]'],
                       filter: Callable[[T_Event], bool] = None) -> T_Event:
      
      if sys.version_info >= (3, 5, 3):
          assert check_argument_types()
  
      async with aclosing(stream_events(signals, filter)) as events:
          return await events.asend(None)
docs: Wait until any of the given signals dispatches an event that satisfies the filter (if any).
  
      If no filter has been given, the first event dispatched from the signal is returned.
  
      :param signals: the signals to get events from
      :param filter: a callable that takes an event object as an argument and returns ``True`` if
          the event should pass, ``False`` if not
      :return: the event that was dispatched