def respond(text=None, ssml=None, attributes=None, reprompt_text=None,<EOL>reprompt_ssml=None, end_session=True):
obj = {<EOL>'<STR_LIT:version>': '<STR_LIT:1.0>',<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': {'<STR_LIT:type>': '<STR_LIT>', '<STR_LIT:text>': '<STR_LIT>'},<EOL>'<STR_LIT>': end_session<EOL>},<EOL>'<STR_LIT>': attributes or {}<EOL>}<EOL>if text:<EOL><INDENT>obj['<STR_LIT>']['<STR_LIT>'] = {'<STR_LIT:type>': '<STR_LIT>', '<STR_LIT:text>': text}<EOL><DEDENT>elif ssml:<EOL><INDENT>obj['<STR_LIT>']['<STR_LIT>'] = {'<STR_LIT:type>': '<STR_LIT>', '<STR_LIT>': ssml}<EOL><DEDENT>reprompt_output = None<EOL>if reprompt_text:<EOL><INDENT>reprompt_output = {'<STR_LIT:type>': '<STR_LIT>', '<STR_LIT:text>': reprompt_text}<EOL><DEDENT>elif reprompt_ssml:<EOL><INDENT>reprompt_output = {'<STR_LIT:type>': '<STR_LIT>', '<STR_LIT>': reprompt_ssml}<EOL><DEDENT>if reprompt_output:<EOL><INDENT>obj['<STR_LIT>']['<STR_LIT>'] = {'<STR_LIT>': reprompt_output}<EOL><DEDENT>return obj<EOL>
Build a dict containing a valid response to an Alexa request.

    If speech output is desired, either of `text` or `ssml` should
    be specified.

    :param text: Plain text speech output to be said by Alexa device.
    :param ssml: Speech output in SSML form.
    :param attributes: Dictionary of attributes to store in the session.
    :param end_session: Should the session be terminated after this response?
    :param reprompt_text, reprompt_ssml: Works the same as
        `text`/`ssml`, but instead sets the reprompting speech output.