def request_software_version(stanza_processor, target_jid, callback,<EOL>error_callback = None):
stanza = Iq(to_jid = target_jid, stanza_type = "<STR_LIT>")<EOL>payload = VersionPayload()<EOL>stanza.set_payload(payload)<EOL>def wrapper(stanza):<EOL><INDENT>"""<STR_LIT>"""<EOL>payload = stanza.get_payload(VersionPayload)<EOL>if payload is None:<EOL><INDENT>if error_callback:<EOL><INDENT>error_callback(stanza)<EOL><DEDENT>else:<EOL><INDENT>logger.warning("<STR_LIT>")<EOL><DEDENT><DEDENT>else:<EOL><INDENT>callback(payload)<EOL><DEDENT><DEDENT>stanza_processor.set_response_handlers(stanza, wrapper, error_callback)<EOL>stanza_processor.send(stanza)<EOL>
Request software version information from a remote entity.

    When a valid response is received the `callback` will be handled
    with a `VersionPayload` instance as its only argument. The object will
    provide the requested infromation.

    In case of error stanza received or invalid response the `error_callback`
    (if provided) will be called with the offending stanza (which can
    be ``<iq type='error'/>`` or ``<iq type='result'>``) as its argument.

    The same function will be called on timeout, with the argument set to
    `None`.

    :Parameters:
        - `stanza_processor`: a object used to send the query and handle
          response. E.g. a `pyxmpp2.client.Client` instance
        - `target_jid`: the JID of the entity to query
        - `callback`: function to be called with a valid response
        - `error_callback`: function to be called on error
    :Types:
        - `stanza_processor`: `StanzaProcessor`
        - `target_jid`: `JID`