<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def proceed(self, *, action=adhoc_xso.ActionType.EXECUTE, payload=None):
 """ Proceed command execution to the next stage. :param action: Action type for proceeding :type action: :class:`~.ActionTyp` :param payload: Payload for the request, or :data:`None` :return: The :attr:`~.xso.Command.first_payload` of the response `action` must be one of the actions returned by :attr:`allowed_actions`. It defaults to :attr:`~.ActionType.EXECUTE`, which is (alongside with :attr:`~.ActionType.CANCEL`) always allowed. `payload` may be a sequence of XSOs, a single XSO or :data:`None`. If it is :data:`None`, the XSOs from the request are re-used. This is useful if you modify the payload in-place (e.g. via :attr:`first_payload`). Otherwise, the payload on the request is set to the `payload` argument; if it is a single XSO, it is wrapped in a sequence. The :attr:`status`, :attr:`response` and related attributes get updated with the newly received values. """


        if self._response is None:
            raise RuntimeError("command execution not started yet")

        if action not in self.allowed_actions:
            raise ValueError("action {} not allowed in this stage".format(
                action
            ))

        cmd = adhoc_xso.Command(
            self._command_name,
            action=action,
            payload=self._response.payload if payload is None else payload,
            sessionid=self.sessionid,
        )

        request = aioxmpp.IQ(
            type_=aioxmpp.IQType.SET,
            to=self._peer_jid,
            payload=cmd,
        )

        try:
            self._response = \
                yield from self._stream.send_iq_and_wait_for_reply(
                    request,
                )
        except (aioxmpp.errors.XMPPModifyError,
                aioxmpp.errors.XMPPCancelError) as exc:
            if isinstance(exc.application_defined_condition,
                          (adhoc_xso.BadSessionID,
                           adhoc_xso.SessionExpired)):
                yield from self.close()
                raise SessionError(exc.text)
            if isinstance(exc, aioxmpp.errors.XMPPCancelError):
                yield from self.close()
            raise

        return self._response.first_payload