<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def first_signal(*signals):
 """ Connect to multiple signals and wait for the first to emit. :param signals: Signals to connect to. :type signals: :class:`AdHocSignal` :return: An awaitable for the first signal to emit. The awaitable returns the first argument passed to the signal. If the first argument is an exception, the exception is re-raised from the awaitable. A common use-case is a situation where a class exposes a "on_finished" type signal and an "on_failure" type signal. :func:`first_signal` can be used to combine those nicely:: # e.g. a aioxmpp.im.conversation.AbstractConversation await first_signal( # emits without arguments when the conversation is successfully # entered conversation.on_enter, # emits with an exception when entering the conversation fails conversation.on_failure, ) # return None (success) .. warning:: Only works with signals which emit with zero or one argument. Signals which emit with more than one argument or with keyword arguments are silently ignored! (Thus, if only such signals are connected, the future will never complete.) (This is a side-effect of the implementation of :meth:`AdHocSignal.AUTO_FUTURE`). .. note:: Does not work with coroutine signals (:class:`SyncAdHocSignal`). """


    fut = asyncio.Future()
    for signal in signals:
        signal.connect(fut, signal.AUTO_FUTURE)
    return fut