def response(self, text, response_type='<STR_LIT>', attachments=None):
from flask import jsonify<EOL>if attachments is None:<EOL><INDENT>attachments = []<EOL><DEDENT>data = {<EOL>'<STR_LIT>': response_type,<EOL>'<STR_LIT:text>': text,<EOL>'<STR_LIT>': attachments,<EOL>}<EOL>return jsonify(**data)<EOL>
Return a response with json format

        :param text: the text returned to the client
        :param response_type: optional. When `in_channel` is assigned,
                              both the response message and the initial
                              message typed by the user will be shared
                              in the channel.
                              When `ephemeral` is assigned, the response
                              message will be visible only to the user
                              that issued the command.
        :param attachments: optional. A list of additional messages
                            for rich response.