<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def task_failure_message(task_report):
 """Task failure message."""

    trace_list = traceback.format_tb(task_report['traceback'])
    body = 'Error: task failure\n\n'
    body += 'Task ID: {}\n\n'.format(task_report['task_id'])
    body += 'Archive: {}\n\n'.format(task_report['archive'])
    body += 'Docker image: {}\n\n'.format(task_report['image'])
    body += 'Exception: {}\n\n'.format(task_report['exception'])
    body += 'Traceback:\n {} {}'.format(
        string.join(trace_list[:-1], ''), trace_list[-1])
    return body