'Process a request for the prev step in the workflow
for a command with multiple steps.
Arguments:
iq -- The command continuation request.'

def _handle_command_prev(self, iq):

    sessionid = iq['command']['sessionid']
    session = self.sessions.get(sessionid)
    if session:
        handler = session['prev']
        interfaces = session['interfaces']
        results = []
        for stanza in iq['command']['substanzas']:
            if (stanza.plugin_attrib in interfaces):
                results.append(stanza)
        if (len(results) == 1):
            results = results[0]
        session = handler(results, session)
        self._process_command_response(iq, session)
    else:
        raise XMPPError('item-not-found')
