def generate_content(data):
    """ Gets the template string and formats it with parsed data. """
    try:
        return templates[data['type']][data['event']] % data['values']
    except KeyError:
        return json_error("Unknown message")
dataset/ETHPy150Open zulip/zulip/zerver/views/webhooks/taiga.py/generate_content/original